summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-04 17:30:22 -0500
committerGitHub <noreply@github.com>2021-01-04 17:30:22 -0500
commitced7c0ab7f347da7bde700d996d5c3d5904c7fa2 (patch)
tree78eba31f7ac6fadc8bf9a09feeec992fe8154ee0 /libpod
parentb5028541cfacc1ee344815c047df70d74fde7b24 (diff)
parentd0093026a24883bed951a51743fb0a5a4888d2fd (diff)
downloadpodman-ced7c0ab7f347da7bde700d996d5c3d5904c7fa2.tar.gz
podman-ced7c0ab7f347da7bde700d996d5c3d5904c7fa2.tar.bz2
podman-ced7c0ab7f347da7bde700d996d5c3d5904c7fa2.zip
Merge pull request #8875 from rhatdan/image
Allow image errors to bubble up from lower level functions.
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/image.go2
-rw-r--r--libpod/image/utils.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 5c3f3b9e4..a9082b2c6 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -497,7 +497,7 @@ func (ir *Runtime) getLocalImage(inputName string) (string, *storage.Image, erro
return inputName, repoImage, nil
}
- return "", nil, errors.Wrapf(ErrNoSuchImage, err.Error())
+ return "", nil, err
}
// ID returns the image ID as a string
diff --git a/libpod/image/utils.go b/libpod/image/utils.go
index 727c73a71..5e7fed5c6 100644
--- a/libpod/image/utils.go
+++ b/libpod/image/utils.go
@@ -45,7 +45,8 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
}
}
if len(candidates) == 0 {
- return nil, errors.Errorf("unable to find a name and tag match for %s in repotags", searchName)
+
+ return nil, errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", searchName)
}
// If more then one candidate and the candidates all have same name