Project

General

Profile

« Previous | Next » 

Revision 12689

bugfix: lib/sh/util.sh: stderr_matches(): when passing `pattern=...` as a prefix env var, must be invoked as `"stderr_matches"` to avoid the env var applying to the prep_try portion of the stderr_matches alias

View differences:

util.sh
720 720
# usage: { stderr2stdout cmd|stdout_contains echo_run grep ...; } 41>&1
721 721
{ echo_func; pipe_delay; pipe_delay; "$@"|echo_stdout >/dev/null; }
722 722

  
723
function stderr_matches() # usage: if pattern=... stderr_matches cmd...; \
724
# then ...; fi; rethrow # manually rethrow any command error (if applicable)
723
function stderr_matches() # usage: prep_try; if pattern=... "stderr_matches" \
724
# cmd...; then ...; fi; rethrow # manually rethrow any cmd error (if applicable)
725 725
# exit status of cmd is placed in $e for use with exception handling
726 726
{
727 727
	echo_func; kw_params pattern; : "${pattern?}"

Also available in: Unified diff