mirror of
https://github.com/containers/podman.git
synced 2025-12-07 22:32:46 +08:00
catch command-not-found errors
Add a special handler to catch errors caused by specifying unknown commands to Podman. This allows printing a more helpful error message. ``` $ podman Command "123123" not found. See `podman --help`. $ podman pod 123123 Command "123123" not found. See `podman pod --help`. ``` Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1379 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
3839c00ae2
commit
bbcad6f572
@@ -52,6 +52,7 @@ func main() {
|
||||
app.Name = "podman"
|
||||
app.Usage = "manage pods and images"
|
||||
app.OnUsageError = usageErrorHandler
|
||||
app.CommandNotFound = commandNotFoundHandler
|
||||
|
||||
app.Version = version.Version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user