-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
The go env
cannot be overwrite by the env
#68864
Comments
I can get the right outputs after changing the GOTOOLCHAIN='auto' to GOTOOLCHAIN='go1.21.9', as follows, however, it's really confusing why the jiazha-mac:openshift-tests-private jiazha$ export GOTOOLCHAIN='go1.21.9'
jiazha-mac:openshift-tests-private jiazha$
jiazha-mac:openshift-tests-private jiazha$ go version
go version go1.21.9 darwin/arm64
jiazha-mac:openshift-tests-private jiazha$ which go
/Users/jiazha/golang/go1.21/bin/go |
go env
cannot be overwrite by the env
go env
cannot be overwrite by the env
This is expected for automatic toolchain upgrades from go.mod Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
It is the design. And it is really confused. The 1.21 go command will search newer enough toolchain versions and call their "go" command instead. If you want to choose a Go toolchain version explicitly, you can try GoTV. |
Go version
go version go1.21.9 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
The
go version
outputs wrong version,What did you expect to see?
I can overwrite the
GOROOT
ofgo env
.The text was updated successfully, but these errors were encountered: