asdf-golang
asdf-golang copied to clipboard
exec-env improvements
See individual commit messages for details on each change.
Checking if GOROOT
and GOPATH
should be more than enough, there is no need to add unset
or add 2 environment variables (ASDF_GOLANG_DISABLE_GOROOT
, ASDF_GOLANG_DISABLE_GOPATH
I just finished reading https://github.com/asdf-community/asdf-direnv/issues/149, I think GOPATH
should not be changed if it was already set since GOPATH
is normally a developer's workspace.
but you are right about unsetting/setting GOROOT
depending on the switch between versions
I agree changing is more crucial for GOROOT
if it's set.
For GOPATH
, one approach would be to change if the already set value looks like something asdf-golang has set it to earlier, otherwise leave alone.
Anyway, I can revise this PR once I know what behavior the maintainers here prefer.
Personally, I would drop touching both GOROOT
and GOPATH
altogether, no matter if set or not. That'd be a backwards incompatible change though -- therefore the ASDF_GOLANG_DISABLE_*
variables, to make the breaking change opt-in.
Thanks for the PR @scop! I've got the next two weeks off, so I'll spend some time digging into this one.
Rebased to resolve conflicts, cleaned up indentation some.
Anything I can do to help with this?