Commit fa6ffc6c authored by Alex Brainman's avatar Alex Brainman

cmd/api: ensure GOPATH always points to the correct go.tools

R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/51000043
parent cefe6ac9
...@@ -46,7 +46,7 @@ func main() { ...@@ -46,7 +46,7 @@ func main() {
gopath := prepGoPath() gopath := prepGoPath()
cmd := exec.Command("go", "install", "--tags=api_tool", "cmd/api") cmd := exec.Command("go", "install", "--tags=api_tool", "cmd/api")
cmd.Env = append([]string{"GOPATH=" + gopath}, filterOut(os.Environ(), "GOARCH")...) cmd.Env = append(filterOut(os.Environ(), "GOARCH", "GOPATH"), "GOPATH="+gopath)
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
log.Fatalf("Error installing cmd/api: %v\n%s", err, out) log.Fatalf("Error installing cmd/api: %v\n%s", err, out)
......
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