mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-28 19:27:58 +00:00
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
33 lines
643 B
Go
33 lines
643 B
Go
package main
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var (
|
|
imageSubCommands = []cli.Command{
|
|
buildCommand,
|
|
historyCommand,
|
|
importCommand,
|
|
inspectCommand,
|
|
loadCommand,
|
|
lsImagesCommand,
|
|
// pruneCommand,
|
|
pullCommand,
|
|
pushCommand,
|
|
rmImageCommand,
|
|
saveCommand,
|
|
tagCommand,
|
|
}
|
|
|
|
imageDescription = "Manage images"
|
|
imageCommand = cli.Command{
|
|
Name: "image",
|
|
Usage: "Manage images",
|
|
Description: imageDescription,
|
|
ArgsUsage: "",
|
|
Subcommands: imageSubCommands,
|
|
UseShortOptionHandling: true,
|
|
OnUsageError: usageErrorHandler,
|
|
}
|
|
)
|