diff options
Diffstat (limited to 'cmd/podman/exists.go')
-rw-r--r-- | cmd/podman/exists.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go index e6d2c8a11..a957e1ef7 100644 --- a/cmd/podman/exists.go +++ b/cmd/podman/exists.go @@ -88,13 +88,13 @@ func containerExistsCmd(c *cli.Context) error { if len(args) > 1 || len(args) < 1 { return errors.New("you may only check for the existence of one container at a time") } - runtime, err := libpodruntime.GetRuntime(c) + runtime, err := adapter.GetRuntime(c) if err != nil { return errors.Wrapf(err, "could not get runtime") } - defer runtime.Shutdown(false) - if _, err := runtime.LookupContainer(args[0]); err != nil { - if errors.Cause(err) == libpod.ErrNoSuchCtr { + defer runtime.Runtime.Shutdown(false) + if _, err := runtime.Runtime.LookupContainer(args[0]); err != nil { + if errors.Cause(err) == libpod.ErrNoSuchCtr || err.Error() == "io.podman.ContainerNotFound" { os.Exit(1) } return err |