Skip to content

Commit

Permalink
chore: make interactive/SelectOptionalComponent error handling explicit
Browse files Browse the repository at this point in the history
Signed-off-by: Kit Patella <[email protected]>
  • Loading branch information
mkcp committed Sep 9, 2024
1 parent 87cf57e commit 8cc968d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pkg/interactive/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ func SelectOptionalComponent(component v1alpha1.ZarfComponent) (bool, error) {
Default: component.Default,
}

// REVIEW(mkcp): Can confirm be true here? It's not clear to me if survey.AskOne will ever flip a boolean
var confirm bool
return confirm, survey.AskOne(prompt, &confirm)
err := survey.AskOne(prompt, &confirm)
if err != nil {
return false, err
}
return confirm, nil
}

// SelectChoiceGroup prompts to select component groups
Expand Down

0 comments on commit 8cc968d

Please sign in to comment.