-
-
Couldn't load subscription status.
- Fork 302
Description
Description
I'm running git bash version 2.43.0.windows.1 on Windows 11.
My Python project uses uv, so I installed commitizen as recommended in the documentation with:
us install commitizen.
I use pyproject.toml so uv run cz init correctly detected the project settings.
I'm able to run the commands info, ls, example, schema, and version.
All other commands commit, bump, and changelog fail.
Steps to reproduce
- Run:
uv run cz commit --dry-runor - Run:
uv run cz bump --dry-runor - Run
uv run cz changelog --dry-run
Current behavior
All three commands fail with:
fatal: not a git repository (or any of the parent directories): .git
With --debug this is the traceback:
Traceback (most recent call last):
File "C:\Users<user-omitted>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users<user-omitted>\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\users<user-omitted>.local\bin\cz.exe_main.py", line 10, in
File "C:\Users<user-omitted>\AppData\Roaming\uv\tools\commitizen\lib\site-packages\commitizen\cli.py", line 660, in main
args.func(conf, arguments)()
File "C:\Users<user-omitted>\AppData\Roaming\uv\tools\commitizen\lib\site-packages\commitizen\commands\commit.py", line 34, in init
raise NotAGitProjectError()
commitizen.exceptions.NotAGitProjectError: fatal: not a git repository (or any of the parent directories): .git
If I run the command: git rev-parse --is-inside-work-tree in the same directory as the above commands, I correctly get true.
Desired behavior
Obviously, I expect that the failing cz commands work as intended when run in my environment.
Screenshots
No response
Environment
Commitizen Version: 4.8.2
Python Version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
Operating System: Windows