mauvehed's dotfiles for personal and work environments
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix brew PATH issue on fresh installs

Homebrew was installing successfully but not being added to PATH
before package installation script ran. This caused all package
installation to be skipped with 'brew not found' error.

Now explicitly adds brew to PATH by evaluating shellenv from known
locations before checking if brew command exists.

mauvehed b93f45e6 f819ad77

+11 -1
+11 -1
.chezmoiscripts/run_onchange_install-packages.sh.tmpl
··· 2 2 3 3 {{ template "utils" . }} 4 4 5 + # Add Homebrew to PATH if it exists at known locations 6 + {{ if eq .osid "linux" }} 7 + if [ -x "/home/linuxbrew/.linuxbrew/bin/brew" ]; then 8 + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" 9 + fi 10 + {{ else if eq .osid "darwin" }} 11 + if [ -x "/opt/homebrew/bin/brew" ]; then 12 + eval "$(/opt/homebrew/bin/brew shellenv)" 13 + fi 14 + {{ end }} 15 + 5 16 if exist brew; then 6 - eval "$(brew shellenv)" 7 17 info "Running run_onchange_install-packages.sh..." 8 18 {{ template "brew" . }} 9 19 if [ $? -eq 0 ]; then