summaryrefslogtreecommitdiff
path: root/cmd/podman/exists.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-22 21:12:49 +0100
committerGitHub <noreply@github.com>2019-02-22 21:12:49 +0100
commitc757cb23ca15634077a8b9fa33aba7abd1c8249b (patch)
treecf98450129274946d9a79d321755d76d115ee3ba /cmd/podman/exists.go
parent8039ccf4d560acbc308066cf8996bc4e6167a4a9 (diff)
parentbc6b4aa39c9156f31a5d370b19e91f42e0f14181 (diff)
downloadpodman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.tar.gz
podman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.tar.bz2
podman-c757cb23ca15634077a8b9fa33aba7abd1c8249b.zip
Merge pull request #2402 from baude/remotepodinspect
podman-remote pod inspect|exists
Diffstat (limited to 'cmd/podman/exists.go')
-rw-r--r--cmd/podman/exists.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go
index 7645bb716..aad203818 100644
--- a/cmd/podman/exists.go
+++ b/cmd/podman/exists.go
@@ -5,7 +5,6 @@ import (
"github.com/spf13/cobra"
"os"
- "github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/adapter"
"github.com/containers/libpod/libpod/image"
@@ -124,14 +123,14 @@ func podExistsCmd(c *cliconfig.PodExistsValues) error {
if len(args) > 1 || len(args) < 1 {
return errors.New("you may only check for the existence of one pod at a time")
}
- runtime, err := libpodruntime.GetRuntime(&c.PodmanCommand)
+ runtime, err := adapter.GetRuntime(&c.PodmanCommand)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
defer runtime.Shutdown(false)
if _, err := runtime.LookupPod(args[0]); err != nil {
- if errors.Cause(err) == libpod.ErrNoSuchPod {
+ if errors.Cause(err) == libpod.ErrNoSuchPod || err.Error() == "io.podman.PodNotFound" {
os.Exit(1)
}
return err