cmd/create: Shuffle some code around

https://github.com/containers/toolbox/pull/667
This commit is contained in:
Debarshi Ray 2021-01-07 21:17:26 +01:00
parent 3994be4c9c
commit 26ea367ee8

View file

@ -100,12 +100,13 @@ func create(cmd *cobra.Command, args []string) error {
return nil
}
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")
}
var container string
var containerArg string
if len(args) != 0 {
container = args[0]
containerArg = "CONTAINER"