Skip to content

husky falls back to original git commit message prompt if I cancel when displaying commitizen prompt #688

@brpaz

Description

@brpaz

Hello.
I am using Husky together with Commitizen to execute git-cz when doing a git commit.

I have defined the following configuration as stated in the documentation:

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

Everything works fine and I am prompted to choose the commit message from commitizen.
The problem is if I hit CTRL-C to cancel my commit, it just closes the commitizen prompt and falls back to the original git commit prompt. I want to abort everything in this case and dont do the commit.

I have tried to remove the "|| true" from the prepare-commit-msg command but it´s the same.

Not sure if it´s an issue of husky or commitizen.

Thanks for the help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions