1
0
mirror of https://github.com/Jguer/yay synced 2024-07-08 20:36:24 +00:00

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
This commit is contained in:
Drumstickx 2022-03-31 14:19:43 +02:00 committed by GitHub
parent 85023f7197
commit 94cff87927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}