diff --git a/internal/cli/cmd/cluster/build.go b/internal/cli/cmd/cluster/build.go index a8d90a4b7..7da6c0612 100644 --- a/internal/cli/cmd/cluster/build.go +++ b/internal/cli/cmd/cluster/build.go @@ -78,7 +78,17 @@ func NewBuildCmd() *cobra.Command { } // XXX: having multiple outputs is not supported by buildctl. - if *push && *dockerLoad && *outputLocal != "" { + var activeModes int + if *push { + activeModes++ + } + if *dockerLoad { + activeModes++ + } + if *outputLocal != "" { + activeModes++ + } + if activeModes > 1 { return fnerrors.New("only one of --push, --load or --output-local can be used at a time") }