Skip to content

Commit 77c2cdf

Browse files
fix(config): only check for multiple configs when filepath is None
Co-authored-by: Tim Hsiung <bear890707@gmail.com>
1 parent f825cd9 commit 77c2cdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

commitizen/config/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def _check_and_warn_multiple_configs(filepath: str | None = None) -> None:
6262

6363

6464
def read_cfg(filepath: str | None = None) -> BaseConfig:
65-
_check_and_warn_multiple_configs(filepath)
65+
if filepath is None:
66+
_check_and_warn_multiple_configs()
6667

6768
for filename in _resolve_config_paths(filepath):
6869
with open(filename, "rb") as f:

0 commit comments

Comments
 (0)