summaryrefslogtreecommitdiff
path: root/debian/patches/009-goinstall_can_install_to_GOPATH.patch
blob: b2d350274bae8e94f37e28b6be552e400ce7fe44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/src/cmd/goinstall/main.go
+++ b/src/cmd/goinstall/main.go
@@ -80,6 +80,10 @@ func main() {
 	}
 	readPackageList()
 
+	if os.Getuid() != 0 && os.Getenv("GOPATH") == "" {
+		fmt.Fprintf(os.Stderr, "%s: set $GOPATH to the directory you want packages installed to if you get permission denied error\n", argv0)
+	}
+
 	// special case - "unsafe" is already installed
 	visit["unsafe"] = done