Fixes the logic for node drain confirmation prompt
This commit is contained in:
parent
99cfe5b302
commit
b45387c03c
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue