Commit ce94c0a7 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 77ea9f9f
...@@ -68,6 +68,9 @@ func DefaultDir() string { ...@@ -68,6 +68,9 @@ func DefaultDir() string {
switch runtime.GOOS { switch runtime.GOOS {
case "windows": case "windows":
dir = os.Getenv("LocalAppData") dir = os.Getenv("LocalAppData")
if dir == "" {
return "off"
}
case "darwin": case "darwin":
dir = os.Getenv("HOME") dir = os.Getenv("HOME")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment