From 5181bc1502f54c735f304c666527aefc7d9446fa Mon Sep 17 00:00:00 2001 From: my-git9 Date: Thu, 18 Aug 2022 22:25:17 +0800 Subject: [PATCH] fix: add space before prompt in CLI (#10362) Signed-off-by: xin.li Signed-off-by: xin.li --- cmd/argocd/commands/app.go | 4 ++-- util/cli/cli.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 9a0e3bcbfacf9..99355a89c30ad 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1156,10 +1156,10 @@ func NewApplicationDeleteCommand(clientOpts *argocdclient.ClientOptions) *cobra. if cascade && isTerminal && !noPrompt { var lowercaseAnswer string if numOfApps == 1 { - lowercaseAnswer = cli.AskToProceedS("Are you sure you want to delete '" + appFullName + "' and all its resources? [y/n]") + lowercaseAnswer = cli.AskToProceedS("Are you sure you want to delete '" + appFullName + "' and all its resources? [y/n] ") } else { if !isConfirmAll { - lowercaseAnswer = cli.AskToProceedS("Are you sure you want to delete '" + appFullName + "' and all its resources? [y/n/A] where 'A' is to delete all specified apps and their resources without prompting") + lowercaseAnswer = cli.AskToProceedS("Are you sure you want to delete '" + appFullName + "' and all its resources? [y/n/A] where 'A' is to delete all specified apps and their resources without prompting ") if lowercaseAnswer == "a" { lowercaseAnswer = "y" isConfirmAll = true diff --git a/util/cli/cli.go b/util/cli/cli.go index 8b4d014c921ff..a91a6fdd7e21b 100644 --- a/util/cli/cli.go +++ b/util/cli/cli.go @@ -111,7 +111,7 @@ func PromptPassword(password string) string { } // AskToProceed prompts the user with a message (typically a yes or no question) and returns whether -// or not they responded in the affirmative or negative. +// they responded in the affirmative or negative. func AskToProceed(message string) bool { for { fmt.Print(message)