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/umount.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/umount.go')
-rw-r--r-- | cmd/podman/umount.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/podman/umount.go b/cmd/podman/umount.go index 33556b2ea..b6837fb5b 100644 --- a/cmd/podman/umount.go +++ b/cmd/podman/umount.go @@ -31,13 +31,14 @@ counter reaches zero indicating no other processes are using the mount. An unmount can be forced with the --force flag. ` umountCommand = cli.Command{ - Name: "umount", - Aliases: []string{"unmount"}, - Usage: "Unmounts working container's root filesystem", - Description: description, - Flags: umountFlags, - Action: umountCmd, - ArgsUsage: "CONTAINER-NAME-OR-ID", + Name: "umount", + Aliases: []string{"unmount"}, + Usage: "Unmounts working container's root filesystem", + Description: description, + Flags: umountFlags, + Action: umountCmd, + ArgsUsage: "CONTAINER-NAME-OR-ID", + OnUsageError: usageErrorHandler, } ) |