Skip to content

Commit

Permalink
Fix failing unit test
Browse files Browse the repository at this point in the history
This addresses the failing test added in the previous commit.
  • Loading branch information
glasserc authored and jorisroovers committed Sep 25, 2020
1 parent 7205b23 commit 6ebeb8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gitlint/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ def author_name(self):
@property
@cache
def author_email(self):
return ustr(_git("config", "--get", "user.email", _cwd=self.context.repository_path)).strip()
try:
return ustr(_git("config", "--get", "user.email", _cwd=self.context.repository_path)).strip()
except GitExitCodeError:
raise GitContextError("Missing git configuration: please set user.email")

@property
@cache
Expand Down

0 comments on commit 6ebeb8e

Please sign in to comment.