summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/helpers.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-19 06:15:53 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-19 06:21:18 -0400
commit1b610e93d264b7823ed6658d1fb4f34331561c3d (patch)
treefd1e16073c202fbf5ba4c99a0f0b2dc852f32928 /pkg/domain/infra/tunnel/helpers.go
parent5b7509c562e040ab8ed17990299c0b6eb52cecee (diff)
downloadpodman-1b610e93d264b7823ed6658d1fb4f34331561c3d.tar.gz
podman-1b610e93d264b7823ed6658d1fb4f34331561c3d.tar.bz2
podman-1b610e93d264b7823ed6658d1fb4f34331561c3d.zip
Fix handling of podman-remote stop --ignore
This patch simplifies the hanlding of rhe --ignore flag, for podman stop, rm Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/helpers.go')
-rw-r--r--pkg/domain/infra/tunnel/helpers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go
index 0c38a3326..5944f855a 100644
--- a/pkg/domain/infra/tunnel/helpers.go
+++ b/pkg/domain/infra/tunnel/helpers.go
@@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
)
-func getContainersByContext(contextWithConnection context.Context, all bool, namesOrIDs []string) ([]entities.ListContainer, error) {
+func getContainersByContext(contextWithConnection context.Context, all, ignore bool, namesOrIDs []string) ([]entities.ListContainer, error) {
var (
cons []entities.ListContainer
)
@@ -36,7 +36,7 @@ func getContainersByContext(contextWithConnection context.Context, all bool, nam
break
}
}
- if !found {
+ if !found && !ignore {
return nil, errors.Wrapf(define.ErrNoSuchCtr, "unable to find container %q", id)
}
}