Description
Apparently #1773 introduced a bug.
When running in a git repository with only a single .cz.toml file at the root, it is detected as a duplicate:
Steps to reproduce
In an empty directory run
pip install -U commitizen==4.11.2
touch .cz.toml
git init .
cz version
Outputs the wrong error message
Multiple config files detected: .cz.toml, .cz.toml. Using config file: '.cz.toml'.
4.11.2
Current behavior
One file is detected twice.
Desired behavior
File should only be detected once.
Screenshots
No response
Environment
Commitizen Version: 4.11.2
Python Version: 3.14.2 (main, Jan 7 2026, 12:38:13) [Clang 17.0.0 (clang-1700.6.3.2)]
Operating System: Darwin
Description
Apparently #1773 introduced a bug.
When running in a git repository with only a single
.cz.tomlfile at the root, it is detected as a duplicate:Steps to reproduce
In an empty directory run
Outputs the wrong error message
Current behavior
One file is detected twice.
Desired behavior
File should only be detected once.
Screenshots
No response
Environment
Commitizen Version: 4.11.2
Python Version: 3.14.2 (main, Jan 7 2026, 12:38:13) [Clang 17.0.0 (clang-1700.6.3.2)]
Operating System: Darwin