Skip to content

Commit 2bb820f

Browse files
ianlancetaylorgopherbot
authored andcommitted
cmd/go: if GOPATH and GOROOT are the same, refer to wiki page
This gives us a place to clarify what the problem is and how people should fix it. For #65656 Fixes #70093 Change-Id: I555399c52e9b72a7a66f0bd38df178c0efad6c27 Reviewed-on: https://go-review.googlesource.com/c/go/+/623815 Reviewed-by: Sam Thanawalla <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent 5dbb0a5 commit 2bb820f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/go/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func main() {
151151
// This setting is equivalent to not setting GOPATH at all,
152152
// which is not what most people want when they do it.
153153
if gopath := cfg.BuildContext.GOPATH; filepath.Clean(gopath) == filepath.Clean(cfg.GOROOT) {
154-
fmt.Fprintf(os.Stderr, "warning: GOPATH set to GOROOT (%s) has no effect\n", gopath)
154+
fmt.Fprintf(os.Stderr, "warning: both GOPATH and GOROOT are the same directory (%s); see https://go.dev/wiki/InstallTroubleshooting\n", gopath)
155155
} else {
156156
for _, p := range filepath.SplitList(gopath) {
157157
// Some GOPATHs have empty directory elements - ignore them.

0 commit comments

Comments
 (0)