mirror of https://github.com/containers/podman.git
Merge pull request #21295 from sm453/add-makecontainer-error-check
Add missing check for errors returned from SpecGenToOCI to MakeContainer
This commit is contained in:
commit
75c60d6139
|
@ -250,6 +250,9 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener
|
|||
options = append(options, opts...)
|
||||
}
|
||||
runtimeSpec, err := SpecGenToOCI(ctx, s, rt, rtc, newImage, finalMounts, pod, command, compatibleOptions)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
if clone { // the container fails to start if cloned due to missing Linux spec entries
|
||||
if c == nil {
|
||||
return nil, nil, nil, errors.New("the given container could not be retrieved")
|
||||
|
|
Loading…
Reference in New Issue