diff options
Diffstat (limited to 'cmd/podman/restore.go')
-rw-r--r-- | cmd/podman/restore.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/podman/restore.go b/cmd/podman/restore.go index 2911bbdd6..eb4d6a6c5 100644 --- a/cmd/podman/restore.go +++ b/cmd/podman/restore.go @@ -29,6 +29,9 @@ var ( restoreCommand.GlobalFlags = MainGlobalOpts return restoreCmd(&restoreCommand) }, + Args: func(cmd *cobra.Command, args []string) error { + return checkAllAndLatest(cmd, args, false) + }, Example: `podman container restore ctrID podman container restore --latest podman container restore --all`, @@ -63,10 +66,6 @@ func restoreCmd(c *cliconfig.RestoreValues) error { TCPEstablished: c.TcpEstablished, } - if err := checkAllAndLatest(&c.PodmanCommand); err != nil { - return err - } - containers, lastError := getAllOrLatestContainers(&c.PodmanCommand, runtime, libpod.ContainerStateExited, "checkpointed") for _, ctr := range containers { |