-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching versions doesn't update GOPATH
#106
Comments
I'm a newbie on I don't know if it's a good idea, I understand there will be people that doesn't want that behavior and always want to install into his original Maybe, you know another ways? I don't know if I'm breaking something else. diff --git a/bin/exec-env b/bin/exec-env
index a363908..2691fd5 100755
--- a/bin/exec-env
+++ b/bin/exec-env
@@ -5,7 +5,5 @@ if [ "${ASDF_INSTALL_VERSION}" != 'system' ] ; then
export GOROOT=$ASDF_INSTALL_PATH/go
fi
- if [[ "unset" == "${GOPATH:-unset}" ]] ; then
- export GOPATH=$ASDF_INSTALL_PATH/packages
- fi
+ export GOPATH=$ASDF_INSTALL_PATH/packages
fi |
@gskll @dobleme Kindly try out this goenv: https://github.com/ankitcharolia/goenv |
This should be closed since it is fixed in Add dynamic GOPATH settings to zsh and fish #127 |
Describe the bug
When I switch between versions the
go env
variables are out of sync.This causes issues when running commands such as
go install
orgo test
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For the
go env
variables to all be updated pointing to the current asdf versionIn the
go env
output above the problematic variables are:GOMODCACHE
GOPATH
GOROOT
GOTOOLDIR
Additional context
In my
config.fish
I haveI get the expected behaviour by adding a line to this to manually update the
go env
Am I doing something wrong? If not could we extend the
set-env
functions to update the GOPATH as well as GOROOT?The text was updated successfully, but these errors were encountered: