diff options
author | Valentin Rothberg <vrothberg@suse.com> | 2018-08-30 19:31:05 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-31 10:19:11 +0000 |
commit | 3839c00ae2f132b115ffabec500ddba2a536527e (patch) | |
tree | 93e57296f79378d949546c8354d6dd2f5a207b5a /cmd/podman/cleanup.go | |
parent | 82a6b373a59b82532263b19c0a8abff9af4a96db (diff) | |
download | podman-3839c00ae2f132b115ffabec500ddba2a536527e.tar.gz podman-3839c00ae2f132b115ffabec500ddba2a536527e.tar.bz2 podman-3839c00ae2f132b115ffabec500ddba2a536527e.zip |
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
Diffstat (limited to 'cmd/podman/cleanup.go')
-rw-r--r-- | cmd/podman/cleanup.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/cleanup.go b/cmd/podman/cleanup.go index a71b3f48a..6ebb682ed 100644 --- a/cmd/podman/cleanup.go +++ b/cmd/podman/cleanup.go @@ -24,12 +24,13 @@ var ( Cleans up mount points and network stacks on one or more containers from the host. The container name or ID can be used. This command is used internally when running containers, but can also be used if container cleanup has failed when a container exits. ` cleanupCommand = cli.Command{ - Name: "cleanup", - Usage: "Cleanup network and mountpoints of one or more containers", - Description: cleanupDescription, - Flags: cleanupFlags, - Action: cleanupCmd, - ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + Name: "cleanup", + Usage: "Cleanup network and mountpoints of one or more containers", + Description: cleanupDescription, + Flags: cleanupFlags, + Action: cleanupCmd, + ArgsUsage: "CONTAINER-NAME [CONTAINER-NAME ...]", + OnUsageError: usageErrorHandler, } ) |