summaryrefslogtreecommitdiff
path: root/libpod/runtime_img.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-03-09 11:53:50 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-03-09 11:53:50 +0100
commit930bec4d3a7cfe83784ded58e5f8f88d062dd3e2 (patch)
treee7d610faea82090a3049001a39045d7fb486efa4 /libpod/runtime_img.go
parent36ec835298d0e33a2f783ceaf4ed19a3b62075f7 (diff)
downloadpodman-930bec4d3a7cfe83784ded58e5f8f88d062dd3e2.tar.gz
podman-930bec4d3a7cfe83784ded58e5f8f88d062dd3e2.tar.bz2
podman-930bec4d3a7cfe83784ded58e5f8f88d062dd3e2.zip
podman load: fix error handling
Make sure to properly return loading errors and to set the exit code accordingly. Fixes: #9672 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/runtime_img.go')
-rw-r--r--libpod/runtime_img.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go
index abefca788..90b11f8ca 100644
--- a/libpod/runtime_img.go
+++ b/libpod/runtime_img.go
@@ -316,7 +316,8 @@ func (r *Runtime) LoadImageFromSingleImageArchive(ctx context.Context, writer io
} {
src, err := referenceFn()
if err == nil && src != nil {
- if newImages, err := r.ImageRuntime().LoadFromArchiveReference(ctx, src, signaturePolicy, writer); err == nil {
+ newImages, err := r.ImageRuntime().LoadFromArchiveReference(ctx, src, signaturePolicy, writer)
+ if err == nil {
return getImageNames(newImages), nil
}
saveErr = err