1
0
mirror of https://github.com/ko-build/ko.git synced 2025-02-01 19:14:40 +02:00

Update gobuild.go (#56)

Changing the order of environment variables so that user supplied value for `CGO_ENABLED` take priority 
https://github.com/google/ko/issues/52
This commit is contained in:
Sumanth Chinthagunta 2019-07-08 20:21:10 -07:00 committed by jonjohnsonjr
parent 0af2e5e8a9
commit d35600780e

View File

@ -117,7 +117,7 @@ func build(ip string, disableOptimizations bool) (string, error) {
// Last one wins
// TODO(mattmoor): GOARCH=amd64
cmd.Env = append(os.Environ(), "CGO_ENABLED=0", "GOOS=linux")
cmd.Env = append([]string{"CGO_ENABLED=0", "GOOS=linux"}, os.Environ()...)
var output bytes.Buffer
cmd.Stderr = &output