summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-07-30 17:20:34 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-31 11:38:48 +0000
commit5b9c60cc10f7dec6d0b030ad16646728f30a67e9 (patch)
treefebb152c00889acea3dc5c7a0c2adf3b8b2e51bd
parent00caebde61256dc7baaf99e5052305a1e15cbee5 (diff)
downloadpodman-5b9c60cc10f7dec6d0b030ad16646728f30a67e9.tar.gz
podman-5b9c60cc10f7dec6d0b030ad16646728f30a67e9.tar.bz2
podman-5b9c60cc10f7dec6d0b030ad16646728f30a67e9.zip
varlink ImageRemove should always return image ID
When removing an image via varlink, we should always return the ID of the image even in the case where the image has multiple repository names and one was only untagged. Reported by jhonce during integration testing. Signed-off-by: baude <bbaude@redhat.com> Closes: #1191 Approved by: jwhonce
-rw-r--r--pkg/varlinkapi/images.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 8e2669660..a129f7099 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -382,11 +382,11 @@ func (i *LibpodAPI) RemoveImage(call ioprojectatomicpodman.VarlinkCall, name str
if err != nil {
return call.ReplyImageNotFound(name)
}
- imageID, err := runtime.RemoveImage(ctx, newImage, force)
+ _, err = runtime.RemoveImage(ctx, newImage, force)
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
- return call.ReplyRemoveImage(imageID)
+ return call.ReplyRemoveImage(newImage.ID())
}
// SearchImage searches all registries configured in /etc/containers/registries.conf for an image