Revision 9199
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
201 | 201 |
# `|| return` needed on Mac because of bug where -e doesn't apply to () |
202 | 202 |
function limit_stderr() |
203 | 203 |
{ |
204 |
local stderr_is_errors="${stderr_is_errors-1}" |
|
205 |
|
|
206 | 204 |
log++ # should only apply during this function for use by can_log |
207 | 205 |
if ! can_log; then exec 2>/dev/null; fi |
208 | 206 |
if test "$stdout2stderr"; then stdout2stderr; fi |
... | ... | |
236 | 234 |
# to view only explicitly-displayed errors: explicit_errors_only=1 script... |
237 | 235 |
{ |
238 | 236 |
if test "$limit_stdout"; then local stdout2stderr=1 limit_stderr=1; fi |
237 |
local stderr_is_errors="${stderr_is_errors-$stdout2stderr}" |
|
239 | 238 |
|
240 | 239 |
cmd2rel_path; echo_cmd "$@"; indent |
241 | 240 |
( |
Also available in: Unified diff
bugfix: lib/sh/util.sh: limit_stderr(): moved $stderr_is_errors default to command() where it's used