From 3839c00ae2f132b115ffabec500ddba2a536527e Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 30 Aug 2018 19:31:05 +0200 Subject: don't print help message for usage errors Don't print potentially verbose help messages in case of usage errors, but print only the usage error followed by a pointer to the command's help. This aligns with Docker. ``` $ podman run -h flag needs an argument: -h See 'podman run --help'. ``` Signed-off-by: Valentin Rothberg Closes: #1379 Approved by: rhatdan --- cmd/podman/main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman/main.go') diff --git a/cmd/podman/main.go b/cmd/podman/main.go index c82c018fa..24d30fd0e 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -51,6 +51,7 @@ func main() { app := cli.NewApp() app.Name = "podman" app.Usage = "manage pods and images" + app.OnUsageError = usageErrorHandler app.Version = version.Version -- cgit v1.2.3-54-g00ecf