From 5b9c60cc10f7dec6d0b030ad16646728f30a67e9 Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 30 Jul 2018 17:20:34 -0500 Subject: 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 Closes: #1191 Approved by: jwhonce --- pkg/varlinkapi/images.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') 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 -- cgit v1.2.3-54-g00ecf