From 3e5a7fa2bf58e5c90f5f4fe9f28257ba6aec677f Mon Sep 17 00:00:00 2001 From: pashakostohrys Date: Mon, 4 Nov 2024 21:49:08 +0200 Subject: [PATCH] feat: add prompting to confirm project window deletion Signed-off-by: pashakostohrys --- cmd/argocd/commands/repo.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/argocd/commands/repo.go b/cmd/argocd/commands/repo.go index 1b2de69d1ba0b..3aba1b2e65513 100644 --- a/cmd/argocd/commands/repo.go +++ b/cmd/argocd/commands/repo.go @@ -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)) @@ -266,7 +266,6 @@ func NewRepoRemoveCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command } else { fmt.Printf("The command to delete '%s' was cancelled.\n", repoURL) } - } }, }