Fixes the logic for node drain confirmation prompt

This commit is contained in:
Diptanu Choudhury 2016-03-27 19:17:29 -07:00
parent 99cfe5b302
commit b45387c03c
1 changed files with 1 additions and 1 deletions

View File

@ -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