Files
podman/cmd/podman/container.go
Valentin Rothberg 3839c00ae2 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
2018-08-31 10:19:11 +00:00

49 lines
896 B
Go

package main
import (
"github.com/urfave/cli"
)
var (
subCommands = []cli.Command{
attachCommand,
cleanupCommand,
commitCommand,
createCommand,
diffCommand,
execCommand,
exportCommand,
inspectCommand,
killCommand,
logsCommand,
lsCommand,
mountCommand,
pauseCommand,
portCommand,
// pruneCommand,
refreshCommand,
restartCommand,
rmCommand,
runCommand,
startCommand,
statsCommand,
stopCommand,
topCommand,
umountCommand,
unpauseCommand,
// updateCommand,
waitCommand,
}
containerDescription = "Manage containers"
containerCommand = cli.Command{
Name: "container",
Usage: "Manage Containers",
Description: containerDescription,
ArgsUsage: "",
Subcommands: subCommands,
UseShortOptionHandling: true,
OnUsageError: usageErrorHandler,
}
)