Skip to content

Commit 561b1c2

Browse files
nicoleman0Lee-W
andauthored
Update commitizen/config/__init__.py
Co-authored-by: Wei Lee <weilee.rx@gmail.com>
1 parent 87bf26f commit 561b1c2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

commitizen/config/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ def _check_and_warn_multiple_configs(filepath: str | None = None) -> None:
4040
# If user explicitly specified a config file, no need to warn
4141
return
4242

43-
git_project_root = git.find_git_project_root()
4443
cfg_search_paths = [Path(".")]
45-
if git_project_root:
44+
if (git_project_root := git.find_git_project_root()):
4645
cfg_search_paths.append(git_project_root)
4746

4847
for path in cfg_search_paths:

0 commit comments

Comments
 (0)