summaryrefslogtreecommitdiff
path: root/cmd/podman/pull.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-02-21 17:43:27 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2019-02-22 16:28:42 -0500
commit3775c6dc636f460a4efae8b6751bae6a881e5f0a (patch)
tree25713893e4b8ae2723a6abcbec81517035da113d /cmd/podman/pull.go
parent84b3f2a7f622636e622416403d1f2642edbbd117 (diff)
downloadpodman-3775c6dc636f460a4efae8b6751bae6a881e5f0a.tar.gz
podman-3775c6dc636f460a4efae8b6751bae6a881e5f0a.tar.bz2
podman-3775c6dc636f460a4efae8b6751bae6a881e5f0a.zip
Exit with errors not just logging error
Several commands were logging errors but exiting with a 0 exit code. This patch cleans these up. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/pull.go')
-rw-r--r--cmd/podman/pull.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index 0065e975a..476bccb0e 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -74,19 +74,16 @@ func pullCmd(c *cliconfig.PullValues) error {
args := c.InputArgs
if len(args) == 0 {
- logrus.Errorf("an image name must be specified")
- return nil
+ return errors.Errorf("an image name must be specified")
}
if len(args) > 1 {
- logrus.Errorf("too many arguments. Requires exactly 1")
- return nil
+ return errors.Errorf("too many arguments. Requires exactly 1")
}
arr := strings.SplitN(args[0], ":", 2)
if len(arr) == 2 {
if c.Bool("all-tags") {
- logrus.Errorf("tag can't be used with --all-tags")
- return nil
+ return errors.Errorf("tag can't be used with --all-tags")
}
}
ctx := getContext()