1
0
mirror of https://github.com/golang/go synced 2024-09-24 17:20:12 -06:00

os: Executable can use /proc/self/exe on android

Fixes the os test on the Android builder.

Change-Id: Ibb9db712156a620fcccf515e035475c5e2f535a5
Reviewed-on: https://go-review.googlesource.com/33650
Run-TryBot: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
David Crawshaw 2016-11-28 17:23:12 -05:00
parent d0d8466aca
commit 8a2c34e413

View File

@ -19,7 +19,7 @@ var executablePath, executablePathErr = func() (string, error) {
switch runtime.GOOS {
default:
return "", errors.New("Executable not implemented for " + runtime.GOOS)
case "linux":
case "linux", "android":
procfn = "/proc/self/exe"
case "netbsd":
procfn = "/proc/curproc/exe"