From 1b610e93d264b7823ed6658d1fb4f34331561c3d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 19 Sep 2020 06:15:53 -0400 Subject: 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 --- pkg/domain/infra/tunnel/helpers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/domain/infra/tunnel/helpers.go') 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) } } -- cgit v1.2.3-54-g00ecf