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

error: unknown option `hook'

Open alialaa opened this issue 6 years ago • 8 comments

Hello, I am trying to use 'git commit' using a husky hook as mentioned in the docs but I get error: unknown option `hook' when husky is trying to run exec < /dev/tty && git cz --hook

alialaa avatar Aug 03 '19 09:08 alialaa

@alialaa Had this issue. Updating commitizen to 4.0.3 fixed it for me.

Indimeco avatar Aug 05 '19 04:08 Indimeco

@Indimeco Are you sure? I am already using this version.

alialaa avatar Aug 05 '19 05:08 alialaa

Yeah, pretty sure this is how I fixed it yesterday. To my understanding the error is saying "you supplied an argument to git-cz that does not exist" i.e., I was using a version where --hook haden't been implemented yet.

Indimeco avatar Aug 05 '19 22:08 Indimeco

I had to rerun the commands ./node_modules/.bin/commitizen and ./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact

vicentelyrio avatar Aug 06 '19 14:08 vicentelyrio

@vicentelyrio thanks I did that and it worked

alialaa avatar Aug 06 '19 18:08 alialaa

Thanks a lot @vicentelyrio

DWboutin avatar Feb 28 '23 22:02 DWboutin

@vicentelyrio vlw meu amigo, to com mesmo problema

gberghauserapotheke avatar May 22 '24 14:05 gberghauserapotheke