diff --git a/commands/build.go b/commands/build.go index af8e2ff2..1e865de3 100644 --- a/commands/build.go +++ b/commands/build.go @@ -305,7 +305,10 @@ func listToMap(values []string, defaultEnv bool) map[string]string { kv := strings.SplitN(value, "=", 2) if len(kv) == 1 { if defaultEnv { - result[kv[0]] = os.Getenv(kv[0]) + v, ok := os.LookupEnv(kv[0]) + if ok { + result[kv[0]] = v + } } else { result[kv[0]] = "" }