Project

General

Profile

« Previous | Next » 

Revision 13190

bugfix: lib/sh/util.sh: stderr_matches(): handle any error: only ignore_e if the error exit status was associated with the matched error message

View differences:

trunk/lib/sh/util.sh
878 878
	
879 879
	# handle any error
880 880
	e="${PIPESTATUS_[0]}" # 1st command's exit status -> $e
881
	ignore_e "$ignore_e" # also works w/ ignore_e=''
881
	local matches="$(errexit "${PIPESTATUS_[1]}"; exit2bool)"
882
	if test "$matches"; then ignore_e "$ignore_e"; fi #also works w/ ignore_e=''
882 883
	rethrow_exit #force-exit b/c caller's test of return status disables errexit
883 884
	
884 885
	return "${PIPESTATUS_[1]}" # 2nd command's exit status -> $?

Also available in: Unified diff