Project

General

Profile

« Previous | Next » 

Revision 9033

lib/sh/util.sh: calls to log_e: don't rely on log_e setting $e

View differences:

lib/sh/util.sh
257 257

  
258 258
# auto-removes a command's output file on error (like make's .DELETE_ON_ERROR)
259 259
function to_file () # usage: stdout=... to_file cmd...
260
{ : "${stdout?}"; log_e "$@" >"$stdout" || { rm "$stdout"; rethrow; }; }
260
{ : "${stdout?}"; log_e "$@" >"$stdout" || { save_e; rm "$stdout"; rethrow; }; }
261 261
alias to_file='to_file ' # last space alias-expands next word
262 262

  
263 263
run_args_cmd () # runs the command line args command

Also available in: Unified diff