From b45387c03c0a82c39709f48f6f5c9888c6af96a0 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Sun, 27 Mar 2016 19:17:29 -0700 Subject: [PATCH] Fixes the logic for node drain confirmation prompt --- command/node_drain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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