Skip to content

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

Open
@wujekbogdan

Description

@wujekbogdan

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions