Dont eat the pull error message for varlink

When using varlink to pull an image, we should expose the actual error to the caller.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #744
Approved by: rhatdan
This commit is contained in:
baude 2018-05-10 10:08:32 -05:00 committed by Atomic Bot
parent 0e58ec7474
commit cc1bad85fe

View file

@ -287,7 +287,7 @@ func (i *LibpodAPI) PullImage(call ioprojectatomicpodman.VarlinkCall, name strin
}
newImage, err := runtime.ImageRuntime().New(getContext(), name, "", "", nil, &image.DockerRegistryOptions{}, image.SigningOptions{}, true, false)
if err != nil {
return call.ReplyErrorOccurred(fmt.Sprintf("unable to pull %s", name))
return call.ReplyErrorOccurred(fmt.Sprintf("unable to pull %s: %s", name, err.Error()))
}
return call.ReplyPullImage(newImage.ID())
}