Skip to content

Commit cd451fd

Browse files
authored
Merge pull request #110 from milesstoetzner/fix/not-a-repo
check if git repo exists when generating config version
2 parents 46cbe43 + ffc8ef9 commit cd451fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/config_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ elif [ -e /opt/puppetlabs/server/pe_version ]; then
2424
# being available.
2525
ruby $1/$2/scripts/config_version-rugged.rb $1 $2
2626

27-
elif type git >/dev/null; then
27+
elif type git >/dev/null && [ -d "$1/$2/.git" ]; then
2828
# The git command is available.
2929
git --git-dir $1/$2/.git rev-parse HEAD
3030

0 commit comments

Comments
 (0)