From 94cff87927f7f1da8da44554632c1cace63f6a57 Mon Sep 17 00:00:00 2001 From: Drumstickx <9080610+Drumstickx@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:19:43 +0200 Subject: [PATCH] Fix ContinueTask user prompt for locales with uppercase yes (#1735) * Fix ContinueTask user prompt for locales with uppercase yes The yes/y strings have to be converted to lowercase to enable matching of the user input converted to lowercase. Otherwise, locales with uppercase yes/y strings (e.g., German: `Ja/J`) will never match. * Addess linter issue * Remove obsolete lowercase conversion --- pkg/text/text.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/text/text.go b/pkg/text/text.go index a4972f84..24519eb7 100644 --- a/pkg/text/text.go +++ b/pkg/text/text.go @@ -74,7 +74,5 @@ func ContinueTask(s string, cont, noConfirm bool) bool { return cont } - response = strings.ToLower(response) - - return response == yes || response == y + return strings.EqualFold(response, yes) || strings.EqualFold(response, y) }