podmanv2 add pre-run to each commmand

each container command needs a prerune because it is not part of the containers subcommand yet

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2020-03-25 19:19:55 -05:00
parent ff0124aee1
commit 06e2a5dd86
7 changed files with 35 additions and 28 deletions

View File

@ -15,10 +15,11 @@ import (
var (
pauseDescription = `Pauses one or more running containers. The container name or ID can be used.`
pauseCommand = &cobra.Command{
Use: "pause [flags] CONTAINER [CONTAINER...]",
Short: "Pause all the processes in one or more containers",
Long: pauseDescription,
RunE: pause,
Use: "pause [flags] CONTAINER [CONTAINER...]",
Short: "Pause all the processes in one or more containers",
Long: pauseDescription,
RunE: pause,
PersistentPreRunE: preRunE,
Example: `podman pause mywebserver
podman pause 860a4b23
podman pause -a`,