Skip to content

Commit

Permalink
fix: add space before prompt in CLI (argoproj#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>
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
my-git9 authored and ciiay committed Aug 18, 2022
1 parent c760c5a commit cc518c4
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 cc518c4

Please sign in to comment.