From f3eb9368cd90ea74dc70f1de525be6afa5f33c2e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 09:07:48 +0100 Subject: [PATCH] always chdir to git dir before getting version Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 21a5c811..40dd21b4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -22,8 +22,6 @@ # Fail if something bogus is going on and export all variables set -u -__cdist_version="$(git describe)" - ################################################################################ # cconf standard vars prefixed with cdist @@ -33,6 +31,8 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" +__cdist_version="$(cd "$__cdist_abs_mydir/.." && git describe)" + ################################################################################ # Names / Constants #