summaryrefslogtreecommitdiff
path: root/cmd/podman/pod_stop.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pod_stop.go')
-rw-r--r--cmd/podman/pod_stop.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/pod_stop.go b/cmd/podman/pod_stop.go
index a9237347e..52c92b521 100644
--- a/cmd/podman/pod_stop.go
+++ b/cmd/podman/pod_stop.go
@@ -27,6 +27,9 @@ var (
podStopCommand.GlobalFlags = MainGlobalOpts
return podStopCmd(&podStopCommand)
},
+ Args: func(cmd *cobra.Command, args []string) error {
+ return checkAllAndLatest(cmd, args, false)
+ },
Example: `podman pod stop mywebserverpod
podman pod stop --latest
podman pod stop --timeout 0 490eb 3557fb`,
@@ -40,14 +43,11 @@ func init() {
flags.BoolVarP(&podStopCommand.All, "all", "a", false, "Stop all running pods")
flags.BoolVarP(&podStopCommand.Latest, "latest", "l", false, "Stop the latest pod podman is aware of")
flags.UintVarP(&podStopCommand.Timeout, "timeout", "t", 0, "Seconds to wait for pod stop before killing the container")
+ markFlagHiddenForRemoteClient("latest", flags)
}
func podStopCmd(c *cliconfig.PodStopValues) error {
timeout := -1
- if err := checkMutuallyExclusiveFlags(&c.PodmanCommand); err != nil {
- return err
- }
-
runtime, err := libpodruntime.GetRuntime(&c.PodmanCommand)
if err != nil {
return errors.Wrapf(err, "could not get runtime")