diff --git a/command/node_drain.go b/command/node_drain.go index 3238142c7..9880cb3db 100644 --- a/command/node_drain.go +++ b/command/node_drain.go @@ -137,7 +137,7 @@ func (c *NodeDrainCommand) Run(args []string) int { // No case c.Ui.Output("Canceling drain toggle") return 0 - } else if strings.ToLower(answer)[0] == 'y' { + } else if strings.ToLower(answer)[0] == 'y' && len(answer) > 1 { // Non exact match yes c.Ui.Output("For confirmation, an exact ‘y’ is required.") return 0