From 95dad4d8a443682e59c14a94035a111bab3e42fc Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 17 Mar 2022 14:51:54 +0100 Subject: podman rmi --ignore Add an `--ignore` flag to `podman image rm` to instruct ignoring image if a specified image does not exist and to not throw an error. Other commands (e.g., `podman container rm`) already support this flag. Such an `--ignore` flag can come in handy in clean-up scripcts such as the teardown phases in the Podman tests. Signed-off-by: Valentin Rothberg --- cmd/podman/images/rm.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman/images/rm.go') diff --git a/cmd/podman/images/rm.go b/cmd/podman/images/rm.go index dd138d410..13dab62d4 100644 --- a/cmd/podman/images/rm.go +++ b/cmd/podman/images/rm.go @@ -56,6 +56,7 @@ func init() { func imageRemoveFlagSet(flags *pflag.FlagSet) { flags.BoolVarP(&imageOpts.All, "all", "a", false, "Remove all images") + flags.BoolVarP(&imageOpts.Ignore, "ignore", "i", false, "Ignore errors if a specified image does not exist") flags.BoolVarP(&imageOpts.Force, "force", "f", false, "Force Removal of the image") } -- cgit v1.2.3-54-g00ecf