diff --git a/puppet/modules/base/files/git_clone.sh b/puppet/modules/base/files/git_clone.sh index 485978a..25325b6 100755 --- a/puppet/modules/base/files/git_clone.sh +++ b/puppet/modules/base/files/git_clone.sh @@ -46,6 +46,9 @@ function git_clone { local GIT_DEST=$2 local GIT_REF=$3 + # Avoid git exiting when in some other dir than the typical /home/stack + cd $(dirname $GIT_DEST) + # do a full clone only if the directory doesn't exist if [[ ! -d $GIT_DEST ]]; then git_timed clone $GIT_REMOTE $GIT_DEST