Skip to content

Commit

Permalink
Handle no go version set case (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjones committed Apr 19, 2024
1 parent e6edd35 commit 652c592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion set-env.fish
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 1 addition & 1 deletion set-env.zsh
Original file line number Diff line number Diff line change
@@ -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}")")"
Expand Down

0 comments on commit 652c592

Please sign in to comment.