Skip to content

Commit 02b8a05

Browse files
committed
Setup GOROOT on init.
Try to add a start of answer to #21. I am not a bash guy, so this may not be idiomatic.
1 parent 0c0f4c7 commit 02b8a05

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libexec/goenv-init

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ mkdir -p "${GOENV_ROOT}/"{shims,versions}
8787
case "$shell" in
8888
fish )
8989
echo "setenv PATH '${GOENV_ROOT}/shims' \$PATH"
90+
echo "setenv GOROOT '$(goenv prefix)'"
9091
echo "setenv GOENV_SHELL $shell"
9192
;;
9293
* )
9394
echo 'export PATH="'${GOENV_ROOT}'/shims:${PATH}"'
95+
echo 'export GOROOT="$(goenv prefix)"'
9496
echo "export GOENV_SHELL=$shell"
9597
;;
9698
esac

0 commit comments

Comments
 (0)