Skip to content

Commit

Permalink
exec-env: set GOROOT and GOPATH unconditionally
Browse files Browse the repository at this point in the history
Otherwise, existing values from the environment may continue to point to
a wrong version.

Refs asdf-community/asdf-direnv#149
  • Loading branch information
scop committed Jan 1, 2023
1 parent b6a4c14 commit 1fe10b7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bin/exec-env
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
if [ "${ASDF_INSTALL_VERSION}" = 'system' ] ; then
unset -v GOROOT GOPATH
else
if [[ "unset" == "${GOROOT:-unset}" ]] ; then
export GOROOT=$ASDF_INSTALL_PATH/go
fi

if [[ "unset" == "${GOPATH:-unset}" ]] ; then
export GOPATH=$ASDF_INSTALL_PATH/packages
fi
export GOROOT=$ASDF_INSTALL_PATH/go
export GOPATH=$ASDF_INSTALL_PATH/packages
fi

0 comments on commit 1fe10b7

Please sign in to comment.