From 1ee466eee4f224cfa7e57b7556b5119b2f02f653 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 2 Sep 2018 07:51:50 -0400 Subject: 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 Closes: #1398 Approved by: vrothberg --- cmd/podman/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') 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 -- cgit v1.2.3-54-g00ecf