only execute brew if installed

This commit is contained in:
Niccolo Borgioli 2021-11-05 16:09:08 +01:00
parent ca63fe4ce6
commit d980651c74
No known key found for this signature in database
GPG Key ID: 81C683415BBD86B0
1 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,9 @@ set -g fish_user_paths "/usr/local/sbin" $fish_user_paths
set -x PIPENV_VENV_IN_PROJECT true
export GOPATH="$HOME/.go"
export GOROOT=(brew --prefix go)"/libexec"
if type -q $program
export GOROOT=(brew --prefix go)"/libexec"
end
export PATH="$PATH:$GOPATH/bin:$GOROOT/bin:$HOME/.cargo/bin"
# The next line updates PATH for the Google Cloud SDK.