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/commit.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cmd/podman/commit.go') diff --git a/cmd/podman/commit.go b/cmd/podman/commit.go index 03210dc35..517eefd07 100644 --- a/cmd/podman/commit.go +++ b/cmd/podman/commit.go @@ -49,12 +49,13 @@ var ( set the commit message with the --message flag, and make changes to the instructions with the --change flag.` commitCommand = cli.Command{ - Name: "commit", - Usage: "Create new image based on the changed container", - Description: commitDescription, - Flags: commitFlags, - Action: commitCmd, - ArgsUsage: "CONTAINER [REPOSITORY[:TAG]]", + Name: "commit", + Usage: "Create new image based on the changed container", + Description: commitDescription, + Flags: commitFlags, + Action: commitCmd, + ArgsUsage: "CONTAINER [REPOSITORY[:TAG]]", + OnUsageError: usageErrorHandler, } ) -- cgit v1.2.3-54-g00ecf