fail if a requested object is not defined

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-03-29 21:51:59 +02:00
parent 878f7d18ce
commit 1cfdc6886f

View file

@ -33,6 +33,9 @@ set -eu
__cdist_target_host="$1"; shift
__cdist_object="$1"; shift
__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")"
[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object"
# Export to non-core for use in manifest and gencode scripts
export $__cdist_name_var_self=$__cdist_object