Skip to content

Commit 12aec55

Browse files
tbpgJay Conrod
authored and
Jay Conrod
committed
cmd/go: say to confirm import path when it's not found
Fixes #31366. Change-Id: Ief26f53e7fe94bedb7db79d3d7130c4cdcec4281 Reviewed-on: https://go-review.googlesource.com/c/go/+/174179 Run-TryBot: Jay Conrod <[email protected]> Reviewed-by: Jay Conrod <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 858064f commit 12aec55

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cmd/go/internal/modfetch/codehost/git.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (r *gitRepo) loadRefs() {
166166
if err != nil {
167167
if rerr, ok := err.(*RunError); ok {
168168
if bytes.Contains(rerr.Stderr, []byte("fatal: could not read Username")) {
169-
rerr.HelpText = "If this is a private repository, see https://golang.org/doc/faq#git_https for additional information."
169+
rerr.HelpText = "Confirm the import path was entered correctly.\nIf this is a private repository, see https://golang.org/doc/faq#git_https for additional information."
170170
}
171171
}
172172
r.refsErr = err

src/cmd/go/testdata/script/mod_get_private_vcs.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ env GO111MODULE=on
66
env GOPROXY=
77

88
! go get github.com/golang/nonexist
9+
stderr 'Confirm the import path was entered correctly.'
910
stderr 'If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.'
1011
! stdout .

0 commit comments

Comments
 (0)