Skip to content

Commit 4121583

Browse files
committed
bake: print and list flag mutually exclusive
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent a41fc81 commit 4121583

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

commands/bake.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ func runBake(ctx context.Context, dockerCli command.Cli, targets []string, in ba
125125
var nodes []builder.Node
126126
var progressConsoleDesc, progressTextDesc string
127127

128+
if in.print && in.list != "" {
129+
return errors.New("--print and --list are mutually exclusive")
130+
}
131+
128132
// instance only needed for reading remote bake files or building
129133
var driverType string
130134
if url != "" || !(in.print || in.list != "") {

0 commit comments

Comments
 (0)