Skip to content

Commit 6d6d1cc

Browse files
committed
Implement anyEnabled
1 parent 21a97e1 commit 6d6d1cc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pkg/commands/compute/setup/products.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,18 @@ func (p *Products) Configure() error {
346346

347347
// Create calls the relevant API to create the service resource(s).
348348
func (p *Products) Create() error {
349+
anyEnabled := false
350+
for _, spec := range productsSpecs {
351+
product := normalizeIfacePtr(spec.getConfiguredProduct(&p.required))
352+
if product != nil && product.Enabled() {
353+
anyEnabled = true
354+
break
355+
}
356+
}
357+
if !anyEnabled {
358+
return nil
359+
}
360+
349361
if p.Spinner == nil {
350362
return fsterrors.RemediationError{
351363
Inner: fmt.Errorf("internal logic error: no spinner configured for setup.Products"),

0 commit comments

Comments
 (0)