summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-21 02:06:56 +0200
committerGitHub <noreply@github.com>2020-05-21 02:06:56 +0200
commit8db7b9ea219ef06c50919dcfabdfdca5676e1456 (patch)
treeb0072940f318fbe34f6ee33750d61f320509eb15 /cmd/podman
parent02b29db3b7f9d2c9fd2342b00f0c1a9a7041779b (diff)
parent2624c043d1b8aef69355616037ee2305298bd08a (diff)
downloadpodman-8db7b9ea219ef06c50919dcfabdfdca5676e1456.tar.gz
podman-8db7b9ea219ef06c50919dcfabdfdca5676e1456.tar.bz2
podman-8db7b9ea219ef06c50919dcfabdfdca5676e1456.zip
Merge pull request #6284 from baude/v2remotetestfixes
Test fixes for remote integration
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/create.go4
-rw-r--r--cmd/podman/containers/rm.go2
2 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 5058cdfe5..bb6cb5fdd 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -6,6 +6,8 @@ import (
"os"
"strings"
+ "github.com/containers/libpod/libpod/define"
+
"github.com/containers/common/pkg/config"
"github.com/containers/libpod/cmd/podman/common"
"github.com/containers/libpod/cmd/podman/registry"
@@ -203,7 +205,7 @@ func pullImage(imageName string) error {
}
if !br.Value || pullPolicy == config.PullImageAlways {
if pullPolicy == config.PullImageNever {
- return errors.New("unable to find a name and tag match for busybox in repotags: no such image")
+ return errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", imageName)
}
_, pullErr := registry.ImageEngine().Pull(registry.GetContext(), imageName, entities.ImagePullOptions{
Authfile: cliVals.Authfile,
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go
index 5ef2e23be..f01462447 100644
--- a/cmd/podman/containers/rm.go
+++ b/cmd/podman/containers/rm.go
@@ -128,5 +128,7 @@ func setExitCode(err error) {
registry.SetExitCode(1)
case cause == define.ErrCtrStateInvalid:
registry.SetExitCode(2)
+ case strings.Contains(cause.Error(), define.ErrCtrStateInvalid.Error()):
+ registry.SetExitCode(2)
}
}