diff options
author | baude <bbaude@redhat.com> | 2019-01-15 14:31:03 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-01-15 14:50:30 -0600 |
commit | 341f91da480bbf337dfb13107389307835b1f0c3 (patch) | |
tree | c1ace140bfd9cfdbae370404f27159748dc2c851 /cmd/podman/exists.go | |
parent | 1b2f75298d98f59fac73a63599cdca3478bef835 (diff) | |
download | podman-341f91da480bbf337dfb13107389307835b1f0c3.tar.gz podman-341f91da480bbf337dfb13107389307835b1f0c3.tar.bz2 podman-341f91da480bbf337dfb13107389307835b1f0c3.zip |
Collaberative podman-remote container exists
Began frameout of container super structs for adapted methods. This allows for the use
of container exists.
Signed-off-by: baude <bbaude@redhat.com>
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 |