diff --git a/pipeline/build/build.go b/pipeline/build/build.go index 2703cc01a..435c46182 100644 --- a/pipeline/build/build.go +++ b/pipeline/build/build.go @@ -65,13 +65,8 @@ func build(name, goos, goarch string, ctx *context.Context) error { func run(goos, goarch string, command []string) error { cmd := exec.Command(command[0], command[1:]...) - cmd.Env = append( - cmd.Env, - "GOOS="+goos, - "GOARCH="+goarch, - "GOROOT="+os.Getenv("GOROOT"), - "GOPATH="+os.Getenv("GOPATH"), - ) + cmd.Env = append(cmd.Env, "GOOS="+goos, "GOARCH="+goarch) + cmd.Env = append(cmd.Env, os.Environ()...) var stdout bytes.Buffer cmd.Stdout = &stdout cmd.Stderr = &stdout