diff options
author | Ed Santiago <santiago@redhat.com> | 2021-10-20 09:11:57 -0600 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2021-11-12 11:08:25 -0500 |
commit | f8ede7c5ed01324f47ebc01f69c11ab1046e1ebb (patch) | |
tree | 3d4b5654c1a0cd0afae55a7bbd575dcbd5999932 /cmd | |
parent | c3f3e6d3b8feabb3116dd5867f2e1117bdb5734f (diff) | |
download | podman-f8ede7c5ed01324f47ebc01f69c11ab1046e1ebb.tar.gz podman-f8ede7c5ed01324f47ebc01f69c11ab1046e1ebb.tar.bz2 podman-f8ede7c5ed01324f47ebc01f69c11ab1046e1ebb.zip |
System tests: confirm that -a and -l clash
...and fix one instance where there was no check
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/start.go | 3 |
1 files changed, 3 insertions, 0 deletions
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") } |