summaryrefslogtreecommitdiff
path: root/cmd/podman/exists.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-16 00:58:11 -0800
committerGitHub <noreply@github.com>2019-01-16 00:58:11 -0800
commit81e94c9049addbbdd47bec6ea99691daee942ecd (patch)
tree186737d7a6578d48496a25233831bc7465381e57 /cmd/podman/exists.go
parent1b2f75298d98f59fac73a63599cdca3478bef835 (diff)
parente68f03ae45adbaa539c7470aa5f99dc870c185dc (diff)
downloadpodman-81e94c9049addbbdd47bec6ea99691daee942ecd.tar.gz
podman-81e94c9049addbbdd47bec6ea99691daee942ecd.tar.bz2
podman-81e94c9049addbbdd47bec6ea99691daee942ecd.zip
Merge pull request #2164 from baude/wehateruntime
podman-remote enable containers
Diffstat (limited to 'cmd/podman/exists.go')
-rw-r--r--cmd/podman/exists.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go
index e6d2c8a11..a7601aaa2 100644
--- a/cmd/podman/exists.go
+++ b/cmd/podman/exists.go
@@ -71,7 +71,7 @@ func imageExistsCmd(c *cli.Context) error {
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Runtime.Shutdown(false)
+ defer runtime.Shutdown(false)
if _, err := runtime.NewImageFromLocal(args[0]); err != nil {
//TODO we need to ask about having varlink defined errors exposed
//so we can reuse them
@@ -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 {
+ if errors.Cause(err) == libpod.ErrNoSuchCtr || err.Error() == "io.podman.ContainerNotFound" {
os.Exit(1)
}
return err