bake: print and list flag mutually exclusive

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2025-01-09 10:40:01 +01:00
parent a41fc81796
commit 41215835cf
No known key found for this signature in database
GPG Key ID: ADE44D8C9D44FBE4

View File

@ -125,6 +125,10 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
var nodes []builder.Node
var progressConsoleDesc, progressTextDesc string
if in.print && in.list != "" {
return errors.New("--print and --list are mutually exclusive")
}
// instance only needed for reading remote bake files or building
var driverType string
if url != "" || !(in.print || in.list != "") {