summaryrefslogtreecommitdiff
path: root/cmd/podman/exists.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-10 12:15:33 -0600
committerbaude <bbaude@redhat.com>2019-01-11 11:30:28 -0600
commit43c6da22b976b6050f86dca50564a4c2b08caee0 (patch)
treeb8cc80c9e8318ee72031c74a401567a5d5f68392 /cmd/podman/exists.go
parent28c35cab8750f379a418e87ed6bd874a12ec158d (diff)
downloadpodman-43c6da22b976b6050f86dca50564a4c2b08caee0.tar.gz
podman-43c6da22b976b6050f86dca50564a4c2b08caee0.tar.bz2
podman-43c6da22b976b6050f86dca50564a4c2b08caee0.zip
Add darwin support for remote-client
Add the ability to cross-compile podman remote for OSX. Also, add image exists and tag to remote-client. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/exists.go')
-rw-r--r--cmd/podman/exists.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmd/podman/exists.go b/cmd/podman/exists.go
index 2e2559ec7..bd1bc24ec 100644
--- a/cmd/podman/exists.go
+++ b/cmd/podman/exists.go
@@ -5,6 +5,7 @@ import (
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/libpod"
+ "github.com/containers/libpod/libpod/adapter"
"github.com/containers/libpod/libpod/image"
"github.com/pkg/errors"
"github.com/urfave/cli"
@@ -66,13 +67,15 @@ func imageExistsCmd(c *cli.Context) error {
if len(args) > 1 || len(args) < 1 {
return errors.New("you may only check for the existence of one image at a time")
}
- runtime, err := libpodruntime.GetRuntime(c)
+ localRuntime, err := adapter.GetRuntime(c)
if err != nil {
return errors.Wrapf(err, "could not get runtime")
}
- defer runtime.Shutdown(false)
- if _, err := runtime.ImageRuntime().NewFromLocal(args[0]); err != nil {
- if errors.Cause(err) == image.ErrNoSuchImage {
+ defer localRuntime.Runtime.Shutdown(false)
+ if _, err := localRuntime.NewImageFromLocal(args[0]); err != nil {
+ //TODO we need to ask about having varlink defined errors exposed
+ //so we can reuse them
+ if errors.Cause(err) == image.ErrNoSuchImage || err.Error() == "io.podman.ImageNotFound" {
os.Exit(1)
}
return err