diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-23 09:22:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-23 09:22:03 -0700 |
commit | c019830a750d3c2cdb20d2568c9e0f9fdc35165e (patch) | |
tree | ffd123dcfa33f64a27d783eb70edf9332f2bc30f /cmd/podman/utils.go | |
parent | 41a8bbdbe01d76d39a7a670ac17df1d3da8b28d5 (diff) | |
parent | e8d69030b621874159176eb67292ce06632ea2fd (diff) | |
download | podman-c019830a750d3c2cdb20d2568c9e0f9fdc35165e.tar.gz podman-c019830a750d3c2cdb20d2568c9e0f9fdc35165e.tar.bz2 podman-c019830a750d3c2cdb20d2568c9e0f9fdc35165e.zip |
Merge pull request #1662 from adrianreber/all-and-latest
Add --all and --latest to checkpoint/restore
Diffstat (limited to 'cmd/podman/utils.go')
-rw-r--r-- | cmd/podman/utils.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go index b193cf889..f9971fd88 100644 --- a/cmd/podman/utils.go +++ b/cmd/podman/utils.go @@ -160,15 +160,8 @@ func (f *RawTtyFormatter) Format(entry *logrus.Entry) ([]byte, error) { } func checkMutuallyExclusiveFlags(c *cli.Context) error { - argLen := len(c.Args()) - if (c.Bool("all") || c.Bool("latest")) && argLen > 0 { - return errors.Errorf("no arguments are needed with --all or --latest") - } - if c.Bool("all") && c.Bool("latest") { - return errors.Errorf("--all and --latest cannot be used together") - } - if argLen < 1 && !c.Bool("all") && !c.Bool("latest") { - return errors.Errorf("you must provide at least one pod name or id") + if err := checkAllAndLatest(c); err != nil { + return err } if err := validateFlags(c, startFlags); err != nil { return err |