Revision 12975
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sh | ||
---|---|---|
227 | 227 |
declare e_=$?; |
228 | 228 |
declare e="$(if test "$e_" = 0; then echo "${e:-0}"; else echo "$e_"; fi)"' |
229 | 229 |
|
230 |
alias rethrow!='errexit "$e"'
|
|
230 |
alias rethrow='errexit "$e"' # only does anything if $e != 0
|
|
231 | 231 |
|
232 |
alias rethrow='{ if test "$e" != 0; then rethrow!; fi; }' |
|
233 |
|
|
234 | 232 |
fi # load new aliases |
235 | 233 |
if self_being_included; then |
236 | 234 |
|
Also available in: Unified diff
lib/sh/util.sh: rethrow: removed `test "$e" != 0` since errexit only does anything if $e != 0