Skip to content

Commit

Permalink
cmd/go: say to confirm import path when it's not found
Browse files Browse the repository at this point in the history
Fixes #31366.

Change-Id: Ief26f53e7fe94bedb7db79d3d7130c4cdcec4281
Reviewed-on: https://go-review.googlesource.com/c/go/+/174179
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
tbpg authored and Jay Conrod committed Apr 30, 2019
1 parent 858064f commit 12aec55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modfetch/codehost/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (r *gitRepo) loadRefs() {
if err != nil {
if rerr, ok := err.(*RunError); ok {
if bytes.Contains(rerr.Stderr, []byte("fatal: could not read Username")) {
rerr.HelpText = "If this is a private repository, see https://golang.org/doc/faq#git_https for additional information."
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."
}
}
r.refsErr = err
Expand Down
1 change: 1 addition & 0 deletions src/cmd/go/testdata/script/mod_get_private_vcs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ env GO111MODULE=on
env GOPROXY=

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

0 comments on commit 12aec55

Please sign in to comment.