From 9313e3ad0d674dc6434988b5d9e9c9bd476acbd4 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 24 Jan 2020 22:50:48 +0900 Subject: [PATCH] cmd/ebitenmobile: Use 'go' directly See golang/go#26845. --- cmd/ebitenmobile/gomobile.go | 4 +--- cmd/ebitenmobile/main.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/ebitenmobile/gomobile.go b/cmd/ebitenmobile/gomobile.go index 1af62233a..6071b062d 100644 --- a/cmd/ebitenmobile/gomobile.go +++ b/cmd/ebitenmobile/gomobile.go @@ -20,7 +20,6 @@ import ( "os" "os/exec" "path/filepath" - "runtime" ) const gomobileHash = "82c397c4c5279f331dce14d734fda7060e4a3691" @@ -55,8 +54,7 @@ func runGo(args ...string) error { env := []string{ "GO111MODULE=on", } - gocmd := filepath.Join(runtime.GOROOT(), "bin", "go") - return runCommand(gocmd, args, env) + return runCommand("go", args, env) } func prepareGomobileCommands() error { diff --git a/cmd/ebitenmobile/main.go b/cmd/ebitenmobile/main.go index 896980a5b..7bd5512e5 100644 --- a/cmd/ebitenmobile/main.go +++ b/cmd/ebitenmobile/main.go @@ -22,7 +22,6 @@ import ( "os" "os/exec" "path/filepath" - "runtime" "strings" "text/template" @@ -46,8 +45,7 @@ func goEnv(name string) string { if val := os.Getenv(name); val != "" { return val } - gocmd := filepath.Join(runtime.GOROOT(), "bin", "go") - val, err := exec.Command(gocmd, "env", name).Output() + val, err := exec.Command("go", "env", name).Output() if err != nil { panic(err) }