diff options
Diffstat (limited to 'cmd/podman/checkpoint.go')
-rw-r--r-- | cmd/podman/checkpoint.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmd/podman/checkpoint.go b/cmd/podman/checkpoint.go index 3484e8957..5b043ed81 100644 --- a/cmd/podman/checkpoint.go +++ b/cmd/podman/checkpoint.go @@ -29,6 +29,9 @@ var ( checkpointCommand.GlobalFlags = MainGlobalOpts return checkpointCmd(&checkpointCommand) }, + Args: func(cmd *cobra.Command, args []string) error { + return checkAllAndLatest(cmd, args, false) + }, Example: `podman checkpoint --keep ctrID podman checkpoint --all podman checkpoint --leave-running --latest`, @@ -63,11 +66,6 @@ func checkpointCmd(c *cliconfig.CheckpointValues) error { KeepRunning: c.LeaveRunning, TCPEstablished: c.TcpEstablished, } - - if err := checkAllAndLatest(&c.PodmanCommand); err != nil { - return err - } - containers, lastError := getAllOrLatestContainers(&c.PodmanCommand, runtime, libpod.ContainerStateRunning, "running") for _, ctr := range containers { |