From d364d41e1b1cf42d11b383fb02fbaa07e8b156f7 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 21 Mar 2018 13:08:32 -0500 Subject: Removing tagged images change in behavior An image name is really just a tag. When an image has multiple tags, we should be able to "delete" the one of its tags without harm. In this case, the "delete' is really a form of Untag (removing the tag from the image). If an image has multiple tags and the user tries to delete by ID without force, this should be denied because when you delete by ID there is no distinguishing it like image tags. Signed-off-by: baude Closes: #528 Approved by: mheon --- cmd/podman/rmi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go index b38686a87..cc902cdbe 100644 --- a/cmd/podman/rmi.go +++ b/cmd/podman/rmi.go @@ -75,14 +75,14 @@ func rmiCmd(c *cli.Context) error { return errors.Errorf("no valid images to delete") } for _, img := range imagesToDelete { - err := runtime.RemoveImage(img, c.Bool("force")) + msg, err := runtime.RemoveImage(img, c.Bool("force")) if err != nil { if lastError != nil { fmt.Fprintln(os.Stderr, lastError) } lastError = err } else { - fmt.Println(img.ID()) + fmt.Println(msg) } } return lastError -- cgit v1.2.3-54-g00ecf