Skip to content

Commit

Permalink
exec-env: unset GOROOT and GOPATH if version is system
Browse files Browse the repository at this point in the history
Otherwise they -- especially GOROOT -- may end up pointing to a
completely wrong one.
  • Loading branch information
scop committed Jan 1, 2023
1 parent f006a12 commit b6a4c14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/exec-env
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

if [ "${ASDF_INSTALL_VERSION}" != 'system' ] ; then
if [ "${ASDF_INSTALL_VERSION}" = 'system' ] ; then
unset -v GOROOT GOPATH
else
if [[ "unset" == "${GOROOT:-unset}" ]] ; then
export GOROOT=$ASDF_INSTALL_PATH/go
fi
Expand Down

0 comments on commit b6a4c14

Please sign in to comment.