aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-04-12 14:26:39 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-04-12 15:24:22 +0200
commitfcea6fda82cc3809f8990c0c80a52f6c4a03c5cd (patch)
treefb74ed3bb903d97cc180fb3036b6b5dbf571a69e /cmd
parent6f3d2edc2beb8d18452cdd7b3b1ef7f05b90f5c5 (diff)
downloadpodman-fcea6fda82cc3809f8990c0c80a52f6c4a03c5cd.tar.gz
podman-fcea6fda82cc3809f8990c0c80a52f6c4a03c5cd.tar.bz2
podman-fcea6fda82cc3809f8990c0c80a52f6c4a03c5cd.zip
pull: exit with error if the image is not found
Closes: https://github.com/containers/libpod/issues/2785 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/pull.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index aa000fc52..7cc7b65b3 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -62,6 +62,11 @@ func init() {
// pullCmd gets the data from the command line and calls pullImage
// to copy an image from a registry to a local machine
func pullCmd(c *cliconfig.PullValues) (retError error) {
+ defer func() {
+ if retError != nil && exitCode == 0 {
+ exitCode = 1
+ }
+ }()
if c.Bool("trace") {
span, _ := opentracing.StartSpanFromContext(Ctx, "pullCmd")
defer span.Finish()