Revision 12719
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sh | ||
---|---|---|
207 | 207 |
alias export_e='e=$?' |
208 | 208 |
alias save_e='declare e=$?' |
209 | 209 |
alias rethrow='return "$e"' |
210 |
# can't use `(exit "$e")` because a bug in bash prevents subshells from |
|
211 |
# triggering errexit (would need to append `|| return` for it to work) |
|
210 | 212 |
alias rethrow_subshell='exit "$e"' |
211 | 213 |
|
212 | 214 |
fi # load new aliases |
Also available in: Unified diff
lib/sh/util.sh: rethrow: documented why can't use `(exit "$e")` (bash bug that prevents errexit)