better logging in __cdist_exec_fail_on_error

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 20:55:53 +02:00
parent 1f4e8fe564
commit 2162d444b3
1 changed files with 2 additions and 1 deletions

View File

@ -187,7 +187,8 @@ __cdist_exec_fail_on_error()
set +e
sh -e "$@"
if [ "$?" -ne 0 ]; then
__cdist_echo error "$1 exited non-zero, showing code:"
__cdist_echo error "$1 exited non-zero"
__cdist_echo info "Faulty code:"
cat "$1"
__cdist_exit_err "Aborting due to non-zero exit code."
fi