commit:     e6165f114e4e640dee266af7f0aeef174a930bbc
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Tue Feb 14 00:48:30 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 03:39:49 2023 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=e6165f11

Permit the empty string to directly indicate falsehood in yesno()

This restores the prior behaviour of not issuing warnings with ewarn()
for the empty string. Though it could only happen where EINFO_VERBOSE
was enabled, doing so generated too many insufficiently useful warnings.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions.sh b/functions.sh
index 82d2192..c80bc41 100644
--- a/functions.sh
+++ b/functions.sh
@@ -54,7 +54,7 @@ yesno()
 {
        for _ in 1 2; do
                case $1 in
-                       [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
+                       [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0|'')
                                return 1
                                ;;
                        [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)

Reply via email to