From b1c5012f3c79f717ad24f54287eddc8757a21b9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:07:07 +0100 Subject: [PATCH] Make __cdist_exit_err write on stderr :-) Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist-object-codegen | 3 +-- conf/types/__file/gencode | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 8542d23f..9e0894f7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -111,7 +111,7 @@ __cdist_debug_echo() __cdist_exit_err() { - echo "$@" + echo "$@" >&2 exit 1 } diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 5ac49f0a..86bdb7c3 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -19,12 +19,11 @@ # # # Generate code from one object (object must be relative path!) +# WARNING: OUTPUT ON STDOUT, ERRORS NEED TO BE ON STDERR! # . cdist-config - [ $# -eq 3 ] || __cdist_usage "" "" "" - set -u export __cdist_target_host="$1"; shift diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 904a871f..0137064f 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -23,6 +23,7 @@ # . cdist-config +set -e type="$(cat type)" mode="$(cat mode)"