Skip to content

Commit

Permalink
No need to specify exact dir for .git dir
Browse files Browse the repository at this point in the history
As long as we are in subtree (we are) it should figure this out without
problem
  • Loading branch information
OwenArnold committed Apr 27, 2021
1 parent 32b7b53 commit d5f93b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ess/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

def _version():
dir_path = os.path.dirname(os.path.realpath(__file__))
git_root = os.path.join(dir_path, '..', '..')
try:
import git
g = git.cmd.Git(git_root)
g = git.cmd.Git(dir_path)
g.fetch()
return g.describe('--tags')
except (ImportError, git.exc.GitError):
Expand Down

0 comments on commit d5f93b2

Please sign in to comment.