-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Ubuntu images incorrectly set GOROOT #2655
Comments
Just a note: @FiloSottile , do you aware about any use-cases that could be broken by removing this variable? |
The only breakage I can imagine is from scripts that use |
The changes are moved to vm rollout and will be available soon |
The changes were deployed everywhere. |
Description
The Ubuntu images should not be setting the
GOROOT
environment variable.The
GOROOT
environment variable is mostly deprecated, and no setup requires it. The go tool knows to look next to the binary path as well as at the path at which it was built (or at the build-timeGOROOT_FINAL
value), so it can find itsGOROOT
automatically.The problem with hardcoding a
GOROOT
is that if any other go tool is in use (for example, because one compiled Go tip), the environment variable will override its autodetectedGOROOT
. The result is that theGOROOT
and the go binary will mismatch, leading to obscure errors.Related: #2452
Area for Triage:
Go
Question, Bug, or Feature?:
Bug
Virtual environments affected
Image version
20210131.1
The text was updated successfully, but these errors were encountered: