Skip to content

Commit

Permalink
get cluster info only if force flag isn't set
Browse files Browse the repository at this point in the history
Signed-off-by: Somtochi Onyekwere <[email protected]>
  • Loading branch information
somtochiama committed Oct 24, 2023
1 parent 76e19e9 commit 47bde51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/flux/bootstrap_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
return err
}

info, err := getFluxClusterInfo(ctx, kubeClient)
if err != nil {
return fmt.Errorf("cluster info unavailable: %w", err)
}
if !bootstrapArgs.force {
err := confirmFluxInstallOverride(info)
info, err := getFluxClusterInfo(ctx, kubeClient)
if err != nil {
return fmt.Errorf("cluster info unavailable: %w", err)
}
err = confirmFluxInstallOverride(info)
if err != nil {
if err == promptui.ErrAbort {
return fmt.Errorf("bootstrap cancelled")
Expand Down

0 comments on commit 47bde51

Please sign in to comment.