fix(create): drop --image Value default so the empty-check survives

Value: cfg.DefaultContainerImage made cmd.String("image") never empty,
which killed the `containerImage == ""` branch in makeContainerImage
and spuriously triggered the `name == default` fallback for `--name foo`
alone. The Usage string already shows the default.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
Luca Di Maio
2026-06-25 09:07:24 +02:00
parent ecd155afb1
commit a1037e6094
+4 -1
View File
@@ -45,7 +45,10 @@ Examples:
"image to use for the container (default: %s)",
cfg.DefaultContainerImage,
),
Value: cfg.DefaultContainerImage,
// No Value default: leaving it empty lets makeContainerImage's
// "no clone & no image" branch select cfg.DefaultContainerImage,
// which is what triggers the default-name fallback. Setting
// Value here would defeat that check (shell parity).
},
&cli.StringFlag{
Name: "name",