Revision 9115
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
250 | 250 |
# `|| return` needed on Mac because of bug where -e doesn't apply to () |
251 | 251 |
function limit_stderr() |
252 | 252 |
{ |
253 |
if ! can_log; then exec 2>/dev/null; fi |
|
254 |
if test "$stdout2stderr"; then stdout2stderr; fi |
|
253 |
if test "$stdout2stderr"; then |
|
254 |
if ! can_log; then exec 1>/dev/null; else stdout2stderr; fi |
|
255 |
else |
|
256 |
if ! can_log; then exec 2>/dev/null; fi |
|
257 |
fi |
|
255 | 258 |
} |
256 | 259 |
alias limit_stderr='inc_log_level; limit_stderr' |
257 | 260 |
|
Also available in: Unified diff
bugfix: lib/sh/util.sh: limit_stderr(): stdout2stderr mode: only limit stdout, since stderr may contain error messages (which should always be displayed)