Fix invalid option case

* Ensure `pihole -q doubleclick.com asd` exits with error
This commit is contained in:
WaLLy3K 2017-09-18 00:58:56 +10:00 committed by GitHub
parent d56beedd7a
commit 54a85d3a63

2
pihole
View file

@ -161,7 +161,7 @@ Options:
# If $options contain non ASCII characters, convert to punycode # If $options contain non ASCII characters, convert to punycode
case "${options}" in case "${options}" in
"" ) str="No domain specified";; "" ) str="No domain specified";;
*$'\n'* ) str="Unknown query option specified";; *" "* ) str="Unknown query option specified";;
*[![:ascii:]]* ) domainQuery=$(idn2 "${options}");; *[![:ascii:]]* ) domainQuery=$(idn2 "${options}");;
* ) domainQuery="${options}";; * ) domainQuery="${options}";;
esac esac