Project

General

Profile

« Previous | Next » 

Revision 9107

bugfix: lib/sh/util.sh: limit_stderr(): need to apply inc_log_level in the caller so it won't get rolled back at the end of the function

View differences:

lib/sh/util.sh
193 193

  
194 194
# usage: ([stdout2stderr=1] limit_stderr; cmd...) || return
195 195
# `|| return` needed on Mac because of bug where -e doesn't apply to ()
196
limit_stderr()
196
function limit_stderr()
197 197
{
198
	inc_log_level
199 198
	if ! can_log; then exec 2>/dev/null; fi
200 199
	if test "$stdout2stderr"; then stdout2stderr; fi
201 200
}
201
alias limit_stderr='limit_stderr; inc_log_level'
202 202

  
203 203
limit_stderr_cmd() # usage: [stdout2stderr=1] limit_stderr_cmd cmd...
204 204
{

Also available in: Unified diff