Skip to content

Commit

Permalink
Clarify prompt result when not selecting an option
Browse files Browse the repository at this point in the history
  • Loading branch information
feedmeapples committed Apr 29, 2023
1 parent 6706817 commit 636fe23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions batch/batch_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ func startBatchJob(c *cli.Context, req *workflowservice.StartBatchOperationReque

var promptMsg string
if err == nil {
promptMsg = fmt.Sprintf("Will start a batch job operating on %v Workflow Executions. Continue? Y/N", color.Yellow(c, "%v", count.GetCount()))
promptMsg = fmt.Sprintf("Will start a batch job operating on %v Workflow Executions. Continue? y/N", color.Yellow(c, "%v", count.GetCount()))
} else {
promptMsg = fmt.Sprintf("Unable to count impacted workflows: %s. Will start a batch job on all Workflow Executions that match %s. Continue? Y/N", err, color.Yellow(c, "%v", query))
promptMsg = fmt.Sprintf("Unable to count impacted workflows: %s. Will start a batch job on all Workflow Executions that match %s. Continue? y/N", err, color.Yellow(c, "%v", query))
}

if !common.PromptYes(promptMsg, c.Bool(common.FlagYes)) {
fmt.Println(color.Green(c, "Operation canceled"))
return nil
}

Expand Down
3 changes: 2 additions & 1 deletion searchattribute/search_attribute_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ func RemoveSearchAttributes(c *cli.Context) error {
}

promptMsg := fmt.Sprintf(
"You are about to remove search attributes %s. Continue? Y/N",
"You are about to remove search attributes %s. Continue? y/N",
color.Yellow(c, "%v", names),
)
if !common.PromptYes(promptMsg, c.Bool(common.FlagYes)) {
fmt.Println(color.Green(c, "Operation canceled"))
return nil
}

Expand Down

0 comments on commit 636fe23

Please sign in to comment.