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:
parent
0af2e5e8a9
commit
d35600780e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user