cz-cli icon indicating copy to clipboard operation
cz-cli copied to clipboard

husky hook does not work

Open FreePhoenix888 opened this issue 2 years ago • 4 comments

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 avatar Sep 04 '23 16:09 FreePhoenix888

@chenaski @pen4

FreePhoenix888 avatar Sep 04 '23 17:09 FreePhoenix888

Related to #934

dwhoban avatar Sep 11 '23 00:09 dwhoban