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

Comittizen runs twice when using the prepare-commit-msg hook #924

Open
wujekbogdan opened this issue Apr 16, 2022 · 4 comments
Open

Comittizen runs twice when using the prepare-commit-msg hook #924

wujekbogdan opened this issue Apr 16, 2022 · 4 comments

Comments

@wujekbogdan
Copy link

Steps to re-produce

  1. Create a prepare-commit-msg hook:
    #!/bin/sh
    . "$(dirname "$0")/_/husky.sh"
    
    exec < /dev/tty && node_modules/.bin/cz --hook || true
    
    
  2. Run git commit
  3. Follow the CLI
  4. Everything works as expected.
  5. Run git cz
  6. Follow the CLI
  7. Everything goes as expected except that, after we complete the wizard, Comittizen opens up again.

Is there any way to prevent prepare-commit-msg hook from running when executing git cz?

@marcitqualab
Copy link

Same issue here. I have configured all as per the documentation.

@marcitqualab
Copy link

This question my be a duplicated on of #844

@atomicrobokid
Copy link

atomicrobokid commented May 10, 2022

Facing exactly the same issue. Kind of makes the whole interactive prepare-commit-msg a bit pointless. When i've finished the interactive prompt it spits me into gits edit message hook in vim

@Zhengqbbb
Copy link
Contributor

ref: #934 (comment)

git config --local core.editor cat

image

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

No branches or pull requests

4 participants