From 4ea56241e57d9fe72a087ec73eb1e6b3161cd084 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Tue, 26 Jan 2021 13:20:01 -0300 Subject: [PATCH] Check for input error --- internal/prompt/prompt.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/prompt/prompt.go b/internal/prompt/prompt.go index 7bca564bd..cd2279af5 100644 --- a/internal/prompt/prompt.go +++ b/internal/prompt/prompt.go @@ -28,7 +28,9 @@ func Confirm(message string) bool { Message: message, } - survey.AskOne(prompt, &result) + if err := survey.AskOne(prompt, &result); err != nil { + return false + } return result }