exec-env: Handle system version correctly

This commit is contained in:
Daniele Sluijters 2017-12-06 19:38:25 +01:00 committed by GitHub
parent da123dbfbc
commit 40e18d3eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,11 @@
#!/usr/bin/env bash
if [ "$GOROOT" = "" ] ; then
export GOROOT=$ASDF_INSTALL_PATH/go
fi
if [ "$GOPATH" = "" ] ; then
export GOPATH=$ASDF_INSTALL_PATH/packages
if [ "${ASDF_INSTALL_VERSION}" != 'system' ] ; then
if [ "$GOROOT" = "" ] ; then
export GOROOT=$ASDF_INSTALL_PATH/go
fi
if [ "$GOPATH" = "" ] ; then
export GOPATH=$ASDF_INSTALL_PATH/packages
fi
fi