Skip to content

Commit

Permalink
Do not fail if profile exists
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov committed Nov 16, 2023
1 parent 1c162a4 commit 528b71b
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions cmd/cli/app/quickstart/quickstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,25 +283,20 @@ var cmd = &cobra.Command{
if st.Code() != codes.AlreadyExists {
return fmt.Errorf("error creating profile: %w", err)
}
cmd.Println("Profile already exists")
return nil
cmd.Println("Hey, it seems you already tried the quickstart command and created such a profile. " +
"In case you have registered new repositories this time, the profile will be already applied " +
"to them.")
} else {
return fmt.Errorf("error creating profile: %w", err)
}
return fmt.Errorf("error creating profile: %w", err)
} else {
table := profile.InitializeTable(cmd)
profile.RenderProfileTable(resp.GetProfile(), table)
table.Render()
}

table := profile.InitializeTable(cmd)
profile.RenderProfileTable(resp.GetProfile(), table)
table.Render()

// Finish - Confirm profile creation
yes = cli.PrintYesNoPrompt(cmd,
stepPromptMsgFinish,
"Finish?",
"Quickstart operation completed.")
if !yes {
return nil
}

cli.PrintCmd(cmd, cli.WarningBanner.Render(stepPromptMsgFinish))
return nil
},
}
Expand Down

0 comments on commit 528b71b

Please sign in to comment.