Skip to content

Commit

Permalink
Merge pull request #34 from kosukemori/remove-goroot
Browse files Browse the repository at this point in the history
Remove GOROOT when system's go
  • Loading branch information
syndbg authored Oct 19, 2017
2 parents 8fff5b7 + 7449cb5 commit a672a7f
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 a672a7f

Please sign in to comment.