1
0
mirror of https://github.com/golang/go synced 2024-11-24 04:00:13 -07:00

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

R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/51000043
This commit is contained in:
Alex Brainman 2014-01-14 16:56:22 +11:00
parent cefe6ac9a1
commit fa6ffc6c9b

View File

@ -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)