diff --git a/set-env.fish b/set-env.fish index a9b0db9..d594458 100644 --- a/set-env.fish +++ b/set-env.fish @@ -1,5 +1,5 @@ function asdf_update_golang_env --on-event fish_prompt - set --local go_path (asdf which go) + set --local go_path (asdf which go 2>/dev/null) if test -n "$go_path" set --local full_path (builtin realpath "$go_path") diff --git a/set-env.zsh b/set-env.zsh index 248e164..c15e683 100644 --- a/set-env.zsh +++ b/set-env.zsh @@ -1,6 +1,6 @@ asdf_update_golang_env() { local go_path - go_path="$(asdf which go)" + go_path="$(asdf which go 2>/dev/null)" if [[ -n "${go_path}" ]]; then export GOROOT GOROOT="$(dirname "$(dirname "${go_path:A}")")"