From 08d18ec1ec029307e988a63137eefe38675226a3 Mon Sep 17 00:00:00 2001
From: Nico Schottelius <nico@kr.ethz.ch>
Date: Wed, 6 Apr 2011 20:05:58 +0200
Subject: [PATCH] show broken code

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
---
 bin/cdist-config | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/cdist-config b/bin/cdist-config
index 8195a304..b5e1fe10 100755
--- a/bin/cdist-config
+++ b/bin/cdist-config
@@ -174,8 +174,9 @@ __cdist_exec_fail_on_error()
 {
    sh -e "$@"
    if [ "$?" -ne 0 ]; then
-      __cdist_echo error  "$1 exited non-zero."
-      __cdist_exit_err "$1 exited non-zero."
+      __cdist_echo error  "$1 exited non-zero, showing code:"
+      cat "$1"
+      __cdist_exit_err "Aborting due to non-zero exit code."
    fi
 }