Skip to content

Commit b6a4c14

Browse files
committed
exec-env: unset GOROOT and GOPATH if version is system
Otherwise they -- especially GOROOT -- may end up pointing to a completely wrong one.
1 parent f006a12 commit b6a4c14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/exec-env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env bash
22

3-
if [ "${ASDF_INSTALL_VERSION}" != 'system' ] ; then
3+
if [ "${ASDF_INSTALL_VERSION}" = 'system' ] ; then
4+
unset -v GOROOT GOPATH
5+
else
46
if [[ "unset" == "${GOROOT:-unset}" ]] ; then
57
export GOROOT=$ASDF_INSTALL_PATH/go
68
fi

0 commit comments

Comments
 (0)