From 848e033666ea63158ad1b8c95a7f1458317530b2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 02 Sep 2014 21:58:55 -0400 Subject: get_options(): Return 1 on illegal option --- diff --git a/lib/getopt.sh b/lib/getopt.sh index 645e77f..32fb57d 100644 --- a/lib/getopt.sh +++ b/lib/getopt.sh @@ -39,6 +39,8 @@ get_options() while getopts "${optstring}" opt; do if [ "x${opt}" != 'x?' ]; then eval "${prefix}${opt}=\"\${OPTARG:-true}\"" + else + return 1 fi unset OPTARG done -- cgit v0.9.1