Skip to content

Commit

Permalink
Merge pull request #16139 from tylerjereddy/treddy_git_security_shim
Browse files Browse the repository at this point in the history
WIP, BLD, MAINT: git security/version shim
  • Loading branch information
tylerjereddy committed May 8, 2022
2 parents a6a2fe5 + b227e3a commit 096d759
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def _minimal_ext_cmd(cmd):
return out

try:
out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
cwd = os.getcwd()
git_dir = os.path.join(cwd, ".git")
out = _minimal_ext_cmd(['git', '--git-dir', git_dir, 'rev-parse', 'HEAD'])
GIT_REVISION = out.strip().decode('ascii')[:7]

# We need a version number that's regularly incrementing for newer commits,
Expand Down

0 comments on commit 096d759

Please sign in to comment.