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
34 lines
723 B
Go
34 lines
723 B
Go
package main
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
)
|
|
|
|
var (
|
|
podDescription = `Manage container pods.
|
|
|
|
Pods are a group of one or more containers sharing the same network, pid and ipc namespaces.
|
|
`
|
|
podSubCommands = []cli.Command{
|
|
podCreateCommand,
|
|
podInspectCommand,
|
|
podKillCommand,
|
|
podPauseCommand,
|
|
podPsCommand,
|
|
podRestartCommand,
|
|
podRmCommand,
|
|
podStartCommand,
|
|
podStatsCommand,
|
|
podStopCommand,
|
|
podTopCommand,
|
|
podUnpauseCommand,
|
|
}
|
|
podCommand = cli.Command{
|
|
Name: "pod",
|
|
Usage: "Manage pods",
|
|
Description: podDescription,
|
|
UseShortOptionHandling: true,
|
|
Subcommands: podSubCommands,
|
|
OnUsageError: usageErrorHandler,
|
|
}
|
|
)
|