better logging in __cdist_exec_fail_on_error

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
remotes/origin/1.6
Nico Schottelius 14 years ago
parent 1f4e8fe564
commit 2162d444b3
  1. 3
      bin/cdist-config

@ -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

Loading…
Cancel
Save