Skip to content

Commit

Permalink
fix: add space before prompt in CLI (#10362)
Browse files Browse the repository at this point in the history
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
  • Loading branch information
my-git9 authored Aug 18, 2022
1 parent cdb5554 commit 5181bc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/argocd/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion util/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5181bc1

Please sign in to comment.