Skip to content

Commit 0f3f836

Browse files
ldeluigitimvink
authored andcommitted
Fix fallback plugin option
1 parent 456bfbe commit 0f3f836

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mkdocs_git_authors_plugin/plugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class GitAuthorsPlugin(BasePlugin):
1313
("show_contribution", config_options.Type(bool, default=False)),
1414
("show_line_count", config_options.Type(bool, default=False)),
1515
("count_empty_lines", config_options.Type(bool, default=True)),
16-
("fallback_to_empty_authors", config_options.Type(bool, default=False))
16+
("fallback_to_empty", config_options.Type(bool, default=False))
1717
# ('sort_authors_by_name', config_options.Type(bool, default=True)),
1818
# ('sort_reverse', config_options.Type(bool, default=False))
1919
)
@@ -23,7 +23,10 @@ def __init__(self):
2323
self._repo = Repo()
2424
self._fallback = False
2525
except GitCommandError:
26-
self._fallback = True
26+
if self.config["fallback_to_empty"]:
27+
self._fallback = True
28+
else:
29+
raise
2730

2831
def on_config(self, config, **kwargs):
2932
"""

0 commit comments

Comments
 (0)