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 <vrothberg@suse.com>

Closes: #1379
Approved by: rhatdan
This commit is contained in:
Valentin Rothberg
2018-08-30 19:31:05 +02:00
committed by Atomic Bot
parent 82a6b373a5
commit 3839c00ae2
57 changed files with 216 additions and 148 deletions

View File

@@ -52,6 +52,7 @@ var createCommand = cli.Command{
HideHelp: true,
SkipArgReorder: true,
UseShortOptionHandling: true,
OnUsageError: usageErrorHandler,
}
func createCmd(c *cli.Context) error {