You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using rye to manage my python project - it's similar to poetry. But during cz init the pre-commit hook install step fails.
Steps to reproduce
Similar to poetry, using rye I add commitizen as a dev dependency
$ rye add commitizen --dev
Then I run
$ rye run cz init
Welcome to commitizen!
Answer the questions to configure your project.
For further configuration visit:
https://commitizen-tools.github.io/commitizen/config/
? Please choose a supported config file: pyproject.toml
? Please choose a cz (commit rule): (default: cz_conventional_commits) cz_conventional_commits
? Choose the source of the version: pep621: Get and set version from pyproject.toml:project.version field
No Existing Tag. Set tag to v0.0.1
? Choose version scheme: pep440
? Please enter the correct version format: (default: "$version")
? Create changelog automatically on bump Yes
? Keep major version zero (0.x) during breaking changes Yes
? What types of pre-commit hook you want to install? (Leave blank if you don't want to install) done (2 selections)
Failed to install pre-commit hook.
Error running pre-commit install --hook-type commit-msg --hook-type pre-push.Outputs are attached below:
stdout:
stderr: 'pre-commit' is not recognized as an internal or external command,
operable program or batch file.
Current behavior
The install pre-commit hook stage fails if you select hooks to install.
if you skip the pre-commit step in cz init then you can do it manually. But new users are unaware this can fail. And the problem is the whole cz init step fails because of this. So you have to start again. It would nice if rye run cz init was supported if that's possible.
Screenshots
No response
Environment
$ rye run cz version
3.25.0
$ rye run python --version
Python 3.12.2
$ rye --version
rye 0.33.0
commit: 0.33.0 (58523f69f 2024-04-24)
platform: windows (x86_64)
self-python: cpython@3.12.2
symlink support: true
uv enabled: true
The text was updated successfully, but these errors were encountered:
Description
I'm using
rye
to manage my python project - it's similar topoetry
. But duringcz init
thepre-commit
hook install step fails.Steps to reproduce
Similar to
poetry
, usingrye
I addcommitizen
as a dev dependencyThen I run
Current behavior
The install
pre-commit
hook stage fails if you select hooks to install.I guess this is because it tries to run
which with
rye
doesn't work.Instead
rye
expects you to 1) havepre-commit
added as a dependency and 2) run the command asDesired behavior
if you skip the
pre-commit
step incz init
then you can do it manually. But new users are unaware this can fail. And the problem is the wholecz init
step fails because of this. So you have to start again. It would nice ifrye run cz init
was supported if that's possible.Screenshots
No response
Environment
The text was updated successfully, but these errors were encountered: