Skip to content
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

cmd/go: errors about netrc need go prefix #70537

Open
rsc opened this issue Nov 23, 2024 · 2 comments
Open

cmd/go: errors about netrc need go prefix #70537

rsc opened this issue Nov 23, 2024 · 2 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Nov 23, 2024

I ran 'go test' in a subprocess with no environment at all (accidentally), and it failed with

could not parse netrc (GOAUTH=netrc): $HOME is not defined

The usual convention is that calls to base.Fatalf need to provide a 'go: ' prefix in the error.
The ones in auth should be fixed.

/cc @matloob @samthanawalla

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 23, 2024
@rsc rsc added this to the Go1.24 milestone Nov 23, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/631535 mentions this issue: cmd/go: add go prefix in base.Fatalf

@cuishuang
Copy link
Contributor

The error message here comes from

dir, err := os.UserHomeDir()

If no environment variables are set, os.UserHomeDir() will return an error. I wonder if we need to add a logic here to get the result of cd ~ && pwd and try to find the .netrc file in that path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants