Merge pull request #221 from cpuguy83/build_args_env

build: only use env for args if set
pull/225/head
Tõnis Tiigi 5 years ago committed by GitHub
commit 5a79b401b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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]] = ""
}

Loading…
Cancel
Save