Skip to content

Commit

Permalink
feat: add prompting to confirm project window deletion
Browse files Browse the repository at this point in the history
Signed-off-by: pashakostohrys <[email protected]>
  • Loading branch information
pasha-codefresh committed Nov 4, 2024
1 parent 342edbb commit 3e5a7fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/argocd/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func NewRepoRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
}
conn, repoIf := headless.NewClientOrDie(clientOpts, c).NewRepoClientOrDie()
defer io.Close(conn)

promptUtil := utils.NewPrompt(clientOpts.PromptsEnabled)
for _, repoURL := range args {
canDelete := promptUtil.Confirm(fmt.Sprintf("Are you sure you want to delete repository '%s'? [y/n]", repoURL))
Expand All @@ -266,7 +266,6 @@ func NewRepoRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command
} else {
fmt.Printf("The command to delete '%s' was cancelled.\n", repoURL)
}

}
},
}
Expand Down

0 comments on commit 3e5a7fa

Please sign in to comment.