spiegel_podman/cmd/podman/image.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

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,
}
)