-
Notifications
You must be signed in to change notification settings - Fork 17.3k
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
build: unset GOWORK when building #51558
Comments
Thanks for reporting.
This problem can also be reproduced with just
It also reproduces if
It's probably better to fix this in the build script, since that way it will help both when installing from source and when using |
Change https://go.dev/cl/393879 mentions this issue: |
I forgot I had the
GOWORK
env var left set in my terminal,when I ran
gotip download
. The env var silently affects how the go is built.Luckily I had an invalid value for
GOWORK
this time and build failed so I could catch this.Otherwise,
gotip download
would silently succeed - I am not sure whether it is built correctly or not.(It's likely that
GOWORK
didn't affect the built, but who knows)It's a user error, but with
go env -w
or use of various env vars, it's a mistake easy to make.Please consider
gotip download
ensures to unset GOWORK or other env vars (GOFLAGS?)that may interfere with the clean build, or at least, report possible erroneous env vars during build.
The text was updated successfully, but these errors were encountered: