diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-09-19 06:15:53 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-09-19 06:21:18 -0400 |
commit | 1b610e93d264b7823ed6658d1fb4f34331561c3d (patch) | |
tree | fd1e16073c202fbf5ba4c99a0f0b2dc852f32928 /pkg/domain/infra/tunnel/helpers.go | |
parent | 5b7509c562e040ab8ed17990299c0b6eb52cecee (diff) | |
download | podman-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.go | 4 |
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) } } |