Skip to content

Commit

Permalink
Run git rev-parse in the correct cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
i80and committed Mar 21, 2019
1 parent 218ea98 commit 3f9ba57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions snooty/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def __init__(self,
username = pwd.getpwuid(os.getuid()).pw_name
branch = subprocess.check_output(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
cwd=root,
encoding='utf-8').strip()
self.prefix = [self.config.name, username, branch]

Expand Down

0 comments on commit 3f9ba57

Please sign in to comment.