File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,6 +294,10 @@ The following is the software that I have set as default:
294294- watch
295295- wget --enable-iri
296296
297+ The installer calls ` brew --prefix ` to detect your Homebrew prefix and appends
298+ ` libexec/gnubin ` directories for coreutils, gnu-sed, and grep to ` .shellpaths `
299+ if they are not already present.
300+
297301## Apps
298302
299303- box-sync
Original file line number Diff line number Diff line change @@ -203,13 +203,13 @@ brew doctor
203203# Add GNU utilities to PATH once in .shellpaths
204204shellpaths_file=" ./homedir/.shellpaths"
205205
206- # Determine Homebrew prefix without invoking brew if possible
207- if grep -qs " /opt/homebrew/bin" " $shellpaths_file " ; then
206+ # Determine Homebrew prefix once using brew if available
207+ if command -v brew > /dev/null 2>&1 ; then
208+ brew_prefix=" $( brew --prefix) "
209+ elif grep -qs " /opt/homebrew/bin" " $shellpaths_file " ; then
208210 brew_prefix=" /opt/homebrew"
209211elif grep -qs " /usr/local/bin" " $shellpaths_file " ; then
210212 brew_prefix=" /usr/local"
211- elif command -v brew > /dev/null 2>&1 ; then
212- brew_prefix=" $( brew --prefix) "
213213else
214214 brew_prefix=" "
215215fi
You can’t perform that action at this time.
0 commit comments