mirror of
https://github.com/golang/go
synced 2024-11-19 17:54:48 -07:00
cmd/go: on Windows, disable cache if LocalAppData is not set
Fixes #23146 Change-Id: I06e3328ecca5e27f8e1ada05c2d7cd9bdda714e6 Reviewed-on: https://go-review.googlesource.com/85996 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
77ea9f9f31
commit
ce94c0a791
3
src/cmd/go/internal/cache/default.go
vendored
3
src/cmd/go/internal/cache/default.go
vendored
@ -68,6 +68,9 @@ func DefaultDir() string {
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
dir = os.Getenv("LocalAppData")
|
||||
if dir == "" {
|
||||
return "off"
|
||||
}
|
||||
|
||||
case "darwin":
|
||||
dir = os.Getenv("HOME")
|
||||
|
Loading…
Reference in New Issue
Block a user