sh/functions.sh.in: return a different value for invalid input in yesno()

This commit is contained in:
Austin English authored and Mike Frysinger committed 2018-11-18 13:22:59 -05:00
1 parent 0f704402a2
commit e10afc8e75
1 file changed
+1 -1
+1 -1
View File
@@ -46,7 +46,7 @@ yesno()
case "$value" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0;;
[Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1;;
*) vewarn "\$$1 is not set properly"; return 1;;
*) vewarn "\$$1 is not set properly"; return 2;;
esac
}