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: misleading error from 'go list -versions' when GOPROXY is invalid #32335

Closed
bcmills opened this issue May 30, 2019 · 1 comment
Closed

cmd/go: misleading error from 'go list -versions' when GOPROXY is invalid #32335

bcmills opened this issue May 30, 2019 · 1 comment
Labels
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented May 30, 2019

Observed:

example.com$ gotip version
go version devel +220552f6 Thu May 30 17:59:57 2019 +0000 linux/amd64

example.com$ gotip mod init example.com
go: creating new go.mod: module example.com

example.com$ GOPROXY='' gotip list -versions -m rsc.io/quote
go: finding rsc.io/quote v1.5.2
rsc.io/quote v1.0.0 v1.1.0 v1.2.0 v1.2.1 v1.3.0 v1.4.0 v1.5.0 v1.5.1 v1.5.2 v1.5.3-pre1

example.com$ GOPROXY='bogus-path' gotip list -versions -m rsc.io/quote
go list -m rsc.io/quote: module "rsc.io/quote" is not a known dependency

example.com$ GOPROXY='bogus-path' gotip get rsc.io/quote@latest
go get rsc.io/quote@latest: invalid proxy URL missing scheme: bogus-path

example.com$

Expected:

An error message from list similar to the one from get:

example.com$ GOPROXY='bogus-path' gotip list -versions -m rsc.io/quote
go list -m rsc.io/quote: invalid proxy URL missing scheme: bogus-path

CC @jayconrod @hyangah

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jun 6, 2019

Change https://golang.org/cl/181018 mentions this issue: cmd/go/internal/modload: propagate errors from Query in 'list -versions'

@gopherbot gopherbot closed this in 5d2377a Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.