Project

General

Profile

« Previous | Next » 

Revision 9048

lib/sh/util.sh: to_file (): run echo_func and `echo_vars stdout` to show what file the output is going to, since this information (i.e. redirects) isn't included in the logging output for the command itself

View differences:

lib/sh/util.sh
263 263

  
264 264
# auto-removes a command's output file on error (like make's .DELETE_ON_ERROR)
265 265
function to_file () # usage: stdout=... to_file cmd...
266
{ : "${stdout?}"; "$@" >"$stdout" || { save_e; log_e; rm "$stdout"; rethrow;}; }
266
{
267
	echo_func
268
	: "${stdout?}"; echo_vars stdout
269
	"$@" >"$stdout" || { save_e; log_e; rm "$stdout"; rethrow; }
270
}
267 271
alias to_file='to_file ' # last space alias-expands next word
268 272

  
269 273
run_args_cmd () # runs the command line args command

Also available in: Unified diff