aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/search.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@suse.com>2018-08-30 19:31:05 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-31 10:19:11 +0000
commit3839c00ae2f132b115ffabec500ddba2a536527e (patch)
tree93e57296f79378d949546c8354d6dd2f5a207b5a /cmd/podman/search.go
parent82a6b373a59b82532263b19c0a8abff9af4a96db (diff)
downloadpodman-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/search.go')
-rw-r--r--cmd/podman/search.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd/podman/search.go b/cmd/podman/search.go
index 2e68e8c21..009ff8ba9 100644
--- a/cmd/podman/search.go
+++ b/cmd/podman/search.go
@@ -52,12 +52,13 @@ var (
Search registries for a given image. Can search all the default registries or a specific registry.
Can limit the number of results, and filter the output based on certain conditions.`
searchCommand = cli.Command{
- Name: "search",
- Usage: "Search registry for image",
- Description: searchDescription,
- Flags: searchFlags,
- Action: searchCmd,
- ArgsUsage: "TERM",
+ Name: "search",
+ Usage: "Search registry for image",
+ Description: searchDescription,
+ Flags: searchFlags,
+ Action: searchCmd,
+ ArgsUsage: "TERM",
+ OnUsageError: usageErrorHandler,
}
)