mirror of https://github.com/golang/go.git
os: make UserHomeDir return "/" on iOS
The UserHomeDir test succeeds on the builder, but not when run manually where HOME is set to the host $HOME. Change-Id: I1db0f608b04b311b53cc0c8160a3778caaf542f6 Reviewed-on: https://go-review.googlesource.com/c/141798 Run-TryBot: Elias Naur <elias.naur@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
a0d6420d8b
commit
93cf82f08a
|
|
@ -394,6 +394,11 @@ func UserHomeDir() string {
|
|||
return Getenv("home")
|
||||
case "nacl", "android":
|
||||
return "/"
|
||||
case "darwin":
|
||||
if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" {
|
||||
return "/"
|
||||
}
|
||||
fallthrough
|
||||
default:
|
||||
return Getenv("HOME")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue