Doesn't get defaulted if $HOME/go is a GOROOT.
Change-Id: I6ac8211a74029e4ad70a50f6e7884a039a27ab05
Reviewed-on: https://go-review.googlesource.com/33720
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
//
// If the environment variable is unset, GOPATH defaults
// to a subdirectory named "go" in the user's home directory
-// ($HOME/go on Unix, %USERPROFILE%\go on Windows).
+// ($HOME/go on Unix, %USERPROFILE%\go on Windows),
+// unless that directory holds a Go distribution.
// Run "go env GOPATH" to see the current GOPATH.
//
// Each directory listed in GOPATH must have a prescribed structure:
If the environment variable is unset, GOPATH defaults
to a subdirectory named "go" in the user's home directory
-($HOME/go on Unix, %USERPROFILE%\go on Windows).
+($HOME/go on Unix, %USERPROFILE%\go on Windows),
+unless that directory holds a Go distribution.
Run "go env GOPATH" to see the current GOPATH.
Each directory listed in GOPATH must have a prescribed structure: