make faulty code a warning

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 21:18:15 +02:00
parent 838d43d74c
commit fb0dafba5c

View file

@ -169,7 +169,7 @@ __cdist_echo()
info) info)
echo $__cdist_echo_prefix "$@" echo $__cdist_echo_prefix "$@"
;; ;;
warning) warn)
echo $__cdist_echo_prefix "Warning: $@" echo $__cdist_echo_prefix "Warning: $@"
;; ;;
error) error)
@ -188,7 +188,7 @@ __cdist_exec_fail_on_error()
sh -e "$@" sh -e "$@"
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
__cdist_echo error "$1 exited non-zero" __cdist_echo error "$1 exited non-zero"
__cdist_echo info "Faulty code:" __cdist_echo warn "Faulty code:"
cat "$1" cat "$1"
__cdist_exit_err "Aborting due to non-zero exit code." __cdist_exit_err "Aborting due to non-zero exit code."
fi fi