summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-09-02 07:51:50 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-05 14:04:50 +0000
commit1ee466eee4f224cfa7e57b7556b5119b2f02f653 (patch)
tree1d2370e52677039e078d5d11e22c86f438aec5e1 /cmd/podman
parent7ffb8a79007414e510ac14ac0d682e1bbfe30c7c (diff)
downloadpodman-1ee466eee4f224cfa7e57b7556b5119b2f02f653.tar.gz
podman-1ee466eee4f224cfa7e57b7556b5119b2f02f653.tar.bz2
podman-1ee466eee4f224cfa7e57b7556b5119b2f02f653.zip
We should fail Podman with ExitCode 125 by default
$ ./bin/podman --foo $ echo $? 125 $ ./bin/podman foo Command "foo" not found. See `podman --help`. $ echo $? 1 After this change $ ./bin/podman foo Command "foo" not found. See `podman --help`. $ echo $? 125 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1398 Approved by: vrothberg
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/common.go b/cmd/podman/common.go
index c3b20b7f0..8b941412f 100644
--- a/cmd/podman/common.go
+++ b/cmd/podman/common.go
@@ -54,7 +54,7 @@ func usageErrorHandler(context *cli.Context, err error, _ bool) error {
func commandNotFoundHandler(context *cli.Context, command string) {
fmt.Fprintf(os.Stderr, "Command %q not found.\nSee `%s --help`.\n", command, context.App.Name)
- os.Exit(1)
+ os.Exit(exitCode)
}
// validateFlags searches for StringFlags or StringSlice flags that never had