Project

General

Profile

« Previous | Next » 

Revision 9025

lib/sh/util.sh: log_e (): rewrote to avoid using save_e, which will be repurposed

View differences:

lib/sh/util.sh
57 57

  
58 58
function log_e () # usage: log_e cmd... [ || use $e (or $?) ]
59 59
{
60
	if ! "save_e" "$@"; then
60
	if "$@"; then :; else # don't use ! because that resets $?
61
		e=$?
61 62
		echo "! $*" >&2
62 63
		echo "! command exited with error $e" >&2
63 64
		rethrow

Also available in: Unified diff