Skip to content

Commit 1fe10b7

Browse files
committed
exec-env: set GOROOT and GOPATH unconditionally
Otherwise, existing values from the environment may continue to point to a wrong version. Refs asdf-community/asdf-direnv#149
1 parent b6a4c14 commit 1fe10b7

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

bin/exec-env

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
if [ "${ASDF_INSTALL_VERSION}" = 'system' ] ; then
44
unset -v GOROOT GOPATH
55
else
6-
if [[ "unset" == "${GOROOT:-unset}" ]] ; then
7-
export GOROOT=$ASDF_INSTALL_PATH/go
8-
fi
9-
10-
if [[ "unset" == "${GOPATH:-unset}" ]] ; then
11-
export GOPATH=$ASDF_INSTALL_PATH/packages
12-
fi
6+
export GOROOT=$ASDF_INSTALL_PATH/go
7+
export GOPATH=$ASDF_INSTALL_PATH/packages
138
fi

0 commit comments

Comments
 (0)