Revision 9689
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
600 | 600 |
} |
601 | 601 |
alias redir='"redir" ' # last space alias-expands next word |
602 | 602 |
|
603 |
alias_append save_e '; unset redirs' # don't redirect error handlers |
|
604 |
|
|
603 | 605 |
command() # usage: [cmd_log_fd=|1|2|#] [verbosity_min=] command extern_cmd... |
604 | 606 |
{ |
605 | 607 |
echo_func; kw_params cmd_log_fd redirs verbosity_min |
... | ... | |
670 | 672 |
if test "$if_not_exists"; then require_not_exists "$stdout" || return 0; fi |
671 | 673 |
|
672 | 674 |
local redirs=("${redirs[@]}" ">$stdout") |
673 |
"$@" || { save_e; unset redirs; test ! "$del" || rm "$stdout"; rethrow; }
|
|
675 |
"$@" || { save_e; test ! "$del" || rm "$stdout"; rethrow; } |
|
674 | 676 |
} |
675 | 677 |
alias to_file='"to_file" ' # last space alias-expands next word |
676 | 678 |
|
Also available in: Unified diff
lib/sh/util.sh: redir(): override save_e and add `unset redirs` so error handlers are not redirected