cmd/create: Make options --image and --release mutually exclusive
... because that's what they inherently are. https://github.com/containers/toolbox/pull/637
This commit is contained in:
parent
db448ed9ce
commit
467492619a
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ func create(cmd *cobra.Command, args []string) error {
|
|||
|
||||
var container string
|
||||
var containerArg string
|
||||
if cmd.Flag("image").Changed && cmd.Flag("release").Changed {
|
||||
return errors.New("options --image and --release cannot be used together")
|
||||
}
|
||||
|
||||
if len(args) != 0 {
|
||||
container = args[0]
|
||||
|
|
Loading…
Reference in a new issue