Commit 66b67e59 authored by Diptanu Choudhury's avatar Diptanu Choudhury
Browse files

Fixes the logic for node drain confirmation prompt

parent 23fc2f89
Showing with 1 addition and 1 deletion
+1 -1
...@@ -137,7 +137,7 @@ func (c *NodeDrainCommand) Run(args []string) int { ...@@ -137,7 +137,7 @@ func (c *NodeDrainCommand) Run(args []string) int {
// No case // No case
c.Ui.Output("Canceling drain toggle") c.Ui.Output("Canceling drain toggle")
return 0 return 0
} else if strings.ToLower(answer)[0] == 'y' { } else if strings.ToLower(answer)[0] == 'y' && len(answer) > 1 {
// Non exact match yes // Non exact match yes
c.Ui.Output("For confirmation, an exact ‘y’ is required.") c.Ui.Output("For confirmation, an exact ‘y’ is required.")
return 0 return 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment