Commit 93cf82f0 authored by Elias Naur's avatar Elias Naur

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a0d6420d
......@@ -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")
}
......
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