blob: e154581853e3126ecb952809b66a9c26ecfc80dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--- a/src/cmd/goinstall/main.go
+++ b/src/cmd/goinstall/main.go
@@ -61,6 +61,14 @@ func main() {
}
root += filepath.FromSlash("/src/pkg/")
+ 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)
+ }
+
+ if root != defaultRoot.path {
+ logfile = filepath.Join(defaultRoot.path, "goinstall.log")
+ }
+
// special case - "unsafe" is already installed
visit["unsafe"] = done
|