From 70a5d8cd1d8e44d755be316730046b73a4a6e2eb Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 20 Oct 2021 09:11:57 -0600 Subject: System tests: confirm that -a and -l clash ...and fix one instance where there was no check Signed-off-by: Ed Santiago --- cmd/podman/containers/start.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmd/podman') diff --git a/cmd/podman/containers/start.go b/cmd/podman/containers/start.go index 1163b9093..8813fc273 100644 --- a/cmd/podman/containers/start.go +++ b/cmd/podman/containers/start.go @@ -87,6 +87,9 @@ func validateStart(cmd *cobra.Command, args []string) error { if len(args) == 0 && !startOptions.Latest && !startOptions.All { return errors.New("start requires at least one argument") } + if startOptions.All && startOptions.Latest { + return errors.Errorf("--all and --latest cannot be used together") + } if len(args) > 0 && startOptions.Latest { return errors.Errorf("--latest and containers cannot be used together") } -- cgit v1.2.3-54-g00ecf