On Android, /tmp does not exist.
Change-Id: Ib1797d79d89704a7a9466ad94efd57d2848b3b57
Reviewed-on: https://go-review.googlesource.com/c/go/+/472255
TryBot-Bypass: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
}
// Chdir to somewhere else on this thread.
// On systems other than Linux, this is a no-op.
- if err := chdir("/tmp"); err != nil {
+ if err := chdir(os.TempDir()); err != nil {
println("failed to chdir:", err.Error())
os.Exit(1)
}