summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-05-11 12:07:42 -0500
committerBrent Baude <bbaude@redhat.com>2020-05-19 14:26:19 -0500
commit8ec08a426e7024d597281dc0af9168f340e10d5d (patch)
tree01dcb8b2a0cb42b0ed7869bf86e64a124d6ff4e6 /cmd
parent9fe49335e0e9c11ab0b7148ba0c5d1426023d2fb (diff)
downloadpodman-8ec08a426e7024d597281dc0af9168f340e10d5d.tar.gz
podman-8ec08a426e7024d597281dc0af9168f340e10d5d.tar.bz2
podman-8ec08a426e7024d597281dc0af9168f340e10d5d.zip
v2 enable remote integration tests
enable remote integration tests Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/rm.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go
index 2a0f9cc6a..5ef2e23be 100644
--- a/cmd/podman/containers/rm.go
+++ b/cmd/podman/containers/rm.go
@@ -3,6 +3,7 @@ package containers
import (
"context"
"fmt"
+ "strings"
"github.com/containers/libpod/cmd/podman/parse"
"github.com/containers/libpod/cmd/podman/registry"
@@ -120,10 +121,12 @@ func rm(cmd *cobra.Command, args []string) error {
func setExitCode(err error) {
cause := errors.Cause(err)
- switch cause {
- case define.ErrNoSuchCtr:
+ switch {
+ case cause == define.ErrNoSuchCtr:
registry.SetExitCode(1)
- case define.ErrCtrStateInvalid:
+ case strings.Contains(cause.Error(), define.ErrNoSuchImage.Error()):
+ registry.SetExitCode(1)
+ case cause == define.ErrCtrStateInvalid:
registry.SetExitCode(2)
}
}