summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-02 21:59:20 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-02 21:59:20 (EDT)
commit65cce6164f8de46bf95c299eb3202c1c27d9cda5 (patch)
treedd6526515d4f9f881a1a3714ffaf87322dc71119
parent848e033666ea63158ad1b8c95a7f1458317530b2 (diff)
prokit: Exit on illegal option
-rw-r--r--src/prokit.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/prokit.sh b/src/prokit.sh
index 9580cfa..037c233 100644
--- a/src/prokit.sh
+++ b/src/prokit.sh
@@ -72,7 +72,10 @@ main()
load_locale
load_cmds
- get_options "${@}"
+ if ! get_options "${@}"; then
+ cmd_help_main >&2
+ exit 1
+ fi
shift $(($OPTIND - 1))
if ${opt_h:-false}; then