aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-03-21 13:08:32 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-22 19:06:51 +0000
commitd364d41e1b1cf42d11b383fb02fbaa07e8b156f7 (patch)
treeced7036c6dbb7e6a6659f79153618b910009386e /cmd/podman
parent2cc51dbb1c0eff1d193e41a8d7e898830c186791 (diff)
downloadpodman-d364d41e1b1cf42d11b383fb02fbaa07e8b156f7.tar.gz
podman-d364d41e1b1cf42d11b383fb02fbaa07e8b156f7.tar.bz2
podman-d364d41e1b1cf42d11b383fb02fbaa07e8b156f7.zip
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 <bbaude@redhat.com> Closes: #528 Approved by: mheon
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/rmi.go4
1 files changed, 2 insertions, 2 deletions
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