Skip to content

Commit

Permalink
Update gobuild.go (ko-build#56)
Browse files Browse the repository at this point in the history
Changing the order of environment variables so that user supplied value for `CGO_ENABLED` take priority 
ko-build#52
  • Loading branch information
xmlking authored and jonjohnsonjr committed Jul 9, 2019
1 parent 0af2e5e commit d356007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/build/gobuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d356007

Please sign in to comment.