Unverified Commit 997b5523 authored by Felix Lange's avatar Felix Lange Committed by GitHub

build: fix GOBIN for gomobile commands (#21361)

parent 4c268e65
...@@ -884,11 +884,12 @@ func gomobileTool(subcmd string, args ...string) *exec.Cmd { ...@@ -884,11 +884,12 @@ func gomobileTool(subcmd string, args ...string) *exec.Cmd {
"PATH=" + GOBIN + string(os.PathListSeparator) + os.Getenv("PATH"), "PATH=" + GOBIN + string(os.PathListSeparator) + os.Getenv("PATH"),
} }
for _, e := range os.Environ() { for _, e := range os.Environ() {
if strings.HasPrefix(e, "GOPATH=") || strings.HasPrefix(e, "PATH=") { if strings.HasPrefix(e, "GOPATH=") || strings.HasPrefix(e, "PATH=") || strings.HasPrefix(e, "GOBIN=") {
continue continue
} }
cmd.Env = append(cmd.Env, e) cmd.Env = append(cmd.Env, e)
} }
cmd.Env = append(cmd.Env, "GOBIN="+GOBIN)
return cmd return cmd
} }
...@@ -957,7 +958,7 @@ func doXCodeFramework(cmdline []string) { ...@@ -957,7 +958,7 @@ func doXCodeFramework(cmdline []string) {
if *local { if *local {
// If we're building locally, use the build folder and stop afterwards // If we're building locally, use the build folder and stop afterwards
bind.Dir, _ = filepath.Abs(GOBIN) bind.Dir = GOBIN
build.MustRun(bind) build.MustRun(bind)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment