mirror of
https://github.com/golang/go
synced 2024-09-24 21:10: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:
parent
d0d8466aca
commit
8a2c34e413
@ -19,7 +19,7 @@ var executablePath, executablePathErr = func() (string, error) {
|
|||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
default:
|
default:
|
||||||
return "", errors.New("Executable not implemented for " + runtime.GOOS)
|
return "", errors.New("Executable not implemented for " + runtime.GOOS)
|
||||||
case "linux":
|
case "linux", "android":
|
||||||
procfn = "/proc/self/exe"
|
procfn = "/proc/self/exe"
|
||||||
case "netbsd":
|
case "netbsd":
|
||||||
procfn = "/proc/curproc/exe"
|
procfn = "/proc/curproc/exe"
|
||||||
|
Loading…
Reference in New Issue
Block a user