husky falls back to original git commit message prompt if I cancel when displaying commitizen prompt
See original GitHub issueHello. I am using Husky together with Commitizen to execute git-cz when doing a git commit.
I have defined the following configuration as stated in the documentation:
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
}
},
Everything works fine and I am prompted to choose the commit message from commitizen. The problem is if I hit CTRL-C to cancel my commit, it just closes the commitizen prompt and falls back to the original git commit prompt. I want to abort everything in this case and dont do the commit.
I have tried to remove the “|| true” from the prepare-commit-msg command but it´s the same.
Not sure if it´s an issue of husky or commitizen.
Thanks for the help.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Add Commitlint, Commitizen, Standard ... - DEV Community
First, install commitlint , a linting tool to check if your commit messages meet the conventional commit format:.
Read more >Add Commitlint, Commitizen, Standard Version, and Husky to ...
You can find the demo repo here: conventional-commits-sveltekit. commitlint. First, install commitlint , a linting tool to check if your commit messages meet ......
Read more >@commitlint/prompt | Yarn - Package Manager
This is the library and commitizen adapter version of commitlint prompt. A ready-to-use cli version is available at @commitlint/prompt-cli.
Read more >How do I stop a Git commit when VI is on the screen waiting ...
You have two options: Provide an empty commit message. If it's a new commit and you haven't yet saved the message, you can...
Read more >Add Commitlint, Commitizen, Standard Version, and Husky to ...
Now let's test if commitlint works (no prompt if linting passed): ... to check your commit message before making any git commit ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For me, I’m trying to use the single command
git commit
and it prompt to choose my type:Then I make de description:
But it’s falling back to VIM to edit COMMIT_EDITMSG:
My pakcage.json husky config and version:
-> Some can help me with this issue? There is some “thing” to avoid open the
COMMIT_EDITMSG
or is the default behavior?Having this issue as well, sadly throws me to vim commit message if I use
CTRL+C