Skip to content

Commit

Permalink
Remove GOROOT when system's go
Browse files Browse the repository at this point in the history
  • Loading branch information
kosukemori committed Oct 11, 2017
1 parent 8fff5b7 commit 7449cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions libexec/goenv-exec
Expand Up @@ -34,7 +34,9 @@ for script in "${scripts[@]}"; do
done

shift 1
# Go needs a GOROOT
export GOROOT="$(goenv-prefix)/"
# Go needs a GOROOT without system's Go
if [[ $GOENV_VERSION != "system" ]]; then
export GOROOT="$(goenv-prefix)/"
fi
export PATH="${GOENV_BIN_PATH}:${GOROOT}/bin:${PATH}"
exec -a "$GOENV_COMMAND" "$GOENV_COMMAND_PATH" "$@"
2 changes: 0 additions & 2 deletions libexec/goenv-init
Expand Up @@ -88,12 +88,10 @@ case "$shell" in
fish )
echo "set -gx PATH '${GOENV_ROOT}/shims' \$PATH"
echo "set -gx GOENV_SHELL $shell"
echo "set -gx GOROOT (goenv prefix)"
;;
* )
echo 'export PATH="'${GOENV_ROOT}'/shims:${PATH}"'
echo "export GOENV_SHELL=$shell"
echo 'export GOROOT="$(goenv prefix)"'
;;
esac

Expand Down

0 comments on commit 7449cb5

Please sign in to comment.