We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74654df commit 225a8c2Copy full SHA for 225a8c2
commitizen/git.py
@@ -58,6 +58,8 @@ def get_all_tags() -> Optional[List[str]]:
58
return [tag.strip() for tag in c.out.split("\n") if tag.strip()]
59
60
61
-def find_git_project_root() -> Path:
+def find_git_project_root() -> Optional[Path]:
62
c = cmd.run("git rev-parse --show-toplevel")
63
- return Path(c.out.strip())
+ if not c.err:
64
+ return Path(c.out.strip())
65
+ return None
0 commit comments