Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

husky hook does not work #981

Open
FreePhoenix888 opened this issue Sep 4, 2023 · 3 comments · May be fixed by #982
Open

husky hook does not work #981

FreePhoenix888 opened this issue Sep 4, 2023 · 3 comments · May be fixed by #982

Comments

@FreePhoenix888
Copy link

This part of README has this:

"husky": {
  "hooks": {
    "prepare-commit-msg": "exec < /dev/tty && npx cz --hook || true"
  }
}

But this hook does not work. When I use git commit - I get default behavior

If I put this in .husky/prepare-commit-msg:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty && npx cz --hook || true

And run git commit it works but after commitizen I see result commit in nano. How to fix this?
image

@FreePhoenix888
Copy link
Author

@chenaski @pen4

@dwhoban
Copy link

dwhoban commented Sep 11, 2023

Related to #934

@muratgozel
Copy link

@FreePhoenix888 make sure to have husky hooks are executable: chmod u+x ./.husky/prepare-commit-msg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants