summaryrefslogtreecommitdiff
path: root/cmd/podman/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/utils.go')
-rw-r--r--cmd/podman/utils.go11
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