Skip to content

Commit 5b541dd

Browse files
committed
Only check if .git exists as a path.
.git can be a directory, but also a reference file.
1 parent 92e088d commit 5b541dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def getversioncfg():
4242
g = cp0.defaults()
4343
# then try to obtain version data from git.
4444
gitdir = os.path.join(MYDIR, '.git')
45-
if os.path.isdir(gitdir) or 'GIT_DIR' in os.environ:
45+
if os.path.exists(gitdir) or 'GIT_DIR' in os.environ:
4646
try:
4747
g = gitinfo()
4848
except OSError:

0 commit comments

Comments
 (0)