diff --git a/core/__cdist_run b/core/__cdist_run index db9fd8d9..8febe550 100755 --- a/core/__cdist_run +++ b/core/__cdist_run @@ -23,10 +23,5 @@ __cdist_run() { - set +e - "$@" - if [ "$?" -ne 0 ]; then - __cdist_echo error "$1 exited non-zero, aborting." - fi - set -e + "$@" || __cdist_echo error "$1 exited non-zero, aborting." } diff --git a/core/__cdist_run_shell b/core/__cdist_run_shell index 1d76e17b..b6e0a57d 100755 --- a/core/__cdist_run_shell +++ b/core/__cdist_run_shell @@ -23,7 +23,6 @@ __cdist_run_shell() { - set +e # Prepend our path, so all cdist tools come before other tools PATH="${__cdist_out_type_bin_dir}:$PATH" sh -e "$@" if [ "$?" -ne 0 ]; then @@ -32,5 +31,4 @@ __cdist_run_shell() cat "$1" __cdist_exit_err "Aborting due to non-zero exit code." fi - set -e }