Skip to content

Commit 9e6c1c3

Browse files
committed
Add default if 'user' cannot be retrieved for dirty commit
1 parent 6e13b04 commit 9e6c1c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simvue/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def git_info(repository: str) -> dict[str, typing.Any]:
4545
# In the case where the repository is dirty blame should point to the
4646
# current developer, not the person responsible for the latest commit
4747
if dirty := git_repo.is_dirty():
48-
blame = git_repo.config_reader().get_value("user", "email")
48+
blame = git_repo.config_reader().get_value("user", "email", "unknown")
4949
else:
5050
blame = current_commit.committer.email
5151

0 commit comments

Comments
 (0)