summaryrefslogtreecommitdiff
path: root/cmd/podman/runlabel.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/runlabel.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/runlabel.go')
-rw-r--r--cmd/podman/runlabel.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go
index 54f210e62..d466651f3 100644
--- a/cmd/podman/runlabel.go
+++ b/cmd/podman/runlabel.go
@@ -13,7 +13,6 @@ import (
"github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/utils"
"github.com/pkg/errors"
- "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -87,8 +86,7 @@ func runlabelCmd(c *cliconfig.RunlabelValues) error {
args := c.InputArgs
if len(args) < 2 {
- logrus.Errorf("the runlabel command requires at least 2 arguments: LABEL IMAGE")
- return nil
+ return errors.Errorf("the runlabel command requires at least 2 arguments: LABEL IMAGE")
}
if c.Display && c.Quiet {
return errors.Errorf("the display and quiet flags cannot be used together.")