mirror of
https://github.com/docker/compose.git
synced 2025-07-23 13:45:00 +02:00
Merge pull request #10250 from ndeloof/nil_build_args
prevent assignment to entry in nil map
This commit is contained in:
commit
7daa2a5325
@ -303,10 +303,10 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
|||||||
}
|
}
|
||||||
|
|
||||||
func flatten(in types.MappingWithEquals) types.Mapping {
|
func flatten(in types.MappingWithEquals) types.Mapping {
|
||||||
if len(in) == 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
out := types.Mapping{}
|
out := types.Mapping{}
|
||||||
|
if len(in) == 0 {
|
||||||
|
return out
|
||||||
|
}
|
||||||
for k, v := range in {
|
for k, v := range in {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user