diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-04-27 11:55:43 +0200 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-04-27 11:55:43 +0200 |
commit | 3b261418918c09128f737f315842edd5ec30bff2 (patch) | |
tree | 1674ec5bc6e44665f0db3a9104d3296d2b4f7bcd | |
parent | f36468e24d812cd9cb338fb4224cf7fdb750c232 (diff) | |
download | ubergit-3b261418918c09128f737f315842edd5ec30bff2.tar.gz ubergit-3b261418918c09128f737f315842edd5ec30bff2.tar.xz |
fix option parsing to properly fail when git-rev-parse fails
Running
eval "$(false || exit 1)"
doesn't exit the calling shell. For that to work the exit command needs to
be echoed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-rw-r--r-- | uglib.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -207,5 +207,5 @@ sq() { ## option parsing ## {{{1 if test -n "$UG_OPTIONS_SPEC"; then - eval "$(printf "%s\n" "$UG_OPTIONS_SPEC" | git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- "$@" || exit "$?")" + eval "$(printf "%s\n" "$UG_OPTIONS_SPEC" | git rev-parse --parseopt --keep-dashdash --stop-at-non-option -- "$@" || echo "exit '$?'")" fi |