aboutsummaryrefslogtreecommitdiffhomepage
path: root/goenv/goenv.go
diff options
context:
space:
mode:
Diffstat (limited to 'goenv/goenv.go')
-rw-r--r--goenv/goenv.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/goenv/goenv.go b/goenv/goenv.go
index 1e62eb35b..d87f6f2e9 100644
--- a/goenv/goenv.go
+++ b/goenv/goenv.go
@@ -42,10 +42,14 @@ var TINYGOROOT string
func Get(name string) string {
switch name {
case "GOOS":
- if dir := os.Getenv("GOOS"); dir != "" {
- return dir
+ goos := os.Getenv("GOOS")
+ if goos == "" {
+ goos = runtime.GOOS
+ }
+ if goos == "android" {
+ goos = "linux"
}
- return runtime.GOOS
+ return goos
case "GOARCH":
if dir := os.Getenv("GOARCH"); dir != "" {
return dir