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

This commit is contained in:
Austin English 2018-11-17 05:18:18 -06:00 committed by Mike Frysinger
parent 0f704402a2
commit e10afc8e75

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
}