tools/toolbox: Consistently handle option parsing failures

`getopt` already prints a message on parse errors, but it still
seems like good style to point to --help as we do elsewhere.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3113>
This commit is contained in:
Florian Müllner 2024-01-12 12:17:17 +01:00 committed by Marge Bot
parent f1422dff83
commit 26e8408b92
2 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ TEMP=$(getopt \
--longoptions 'skip-mutter' \
--longoptions 'set-default' \
--longoptions 'help' \
-- "$@")
-- "$@") || die "Run $(basename $0) --help to see available options"
eval set -- "$TEMP"
unset TEMP

View File

@ -50,7 +50,7 @@ TEMP=$(getopt \
--longoptions 'toolbox:' \
--longoptions 'dist' \
--longoptions 'help' \
-- "$@")
-- "$@") || die "Run $(basename $0) --help to see available options"
eval set -- "$TEMP"
unset TEMP