mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #38924 from tiborvass/fix-empty-warnings
ContainerCreate shouldn't return warnings=nil
This commit is contained in:
commit
02ec758372
1 changed files with 4 additions and 0 deletions
|
@ -96,6 +96,10 @@ func (daemon *Daemon) containerCreate(opts createOpts) (containertypes.Container
|
||||||
}
|
}
|
||||||
containerActions.WithValues("create").UpdateSince(start)
|
containerActions.WithValues("create").UpdateSince(start)
|
||||||
|
|
||||||
|
if warnings == nil {
|
||||||
|
warnings = make([]string, 0) // Create an empty slice to avoid https://github.com/moby/moby/issues/38222
|
||||||
|
}
|
||||||
|
|
||||||
return containertypes.ContainerCreateCreatedBody{ID: container.ID, Warnings: warnings}, nil
|
return containertypes.ContainerCreateCreatedBody{ID: container.ID, Warnings: warnings}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue