Skip to content

Commit

Permalink
Merge pull request #300 from compose-spec/osenv-precedence
Browse files Browse the repository at this point in the history
Return precedence to OS Env over Env Files
  • Loading branch information
ulyssessouza committed Aug 18, 2022
2 parents 5135b47 + f52c600 commit 7aed131
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/options.go
Expand Up @@ -198,6 +198,9 @@ func WithDotEnv(o *ProjectOptions) error {
}
for k, v := range envMap {
o.Environment[k] = v
if osVal, ok := os.LookupEnv(k); ok {
o.Environment[k] = osVal
}
}
return nil
}
Expand Down

0 comments on commit 7aed131

Please sign in to comment.