Skip to content

Commit ddf9b80

Browse files
committed
Implement anyEnabled
1 parent 21a97e1 commit ddf9b80

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pkg/commands/compute/setup/products.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,19 @@ 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+
350+
anyEnabled := false
351+
for _, spec := range productsSpecs {
352+
product := normalizeIfacePtr(spec.getConfiguredProduct(&p.required))
353+
if product != nil && product.Enabled() {
354+
anyEnabled = true
355+
break
356+
}
357+
}
358+
if !anyEnabled {
359+
return nil
360+
}
361+
349362
if p.Spinner == nil {
350363
return fsterrors.RemediationError{
351364
Inner: fmt.Errorf("internal logic error: no spinner configured for setup.Products"),

0 commit comments

Comments
 (0)