commitizen / commitizen/cz-cli
Comittizen runs twice when using the `prepare-commit-msg` hook
未关闭
- 主要语言
- JavaScript
- 星标
- 17.5k
- 派生
- 566
- 平均合并
- 8 小时 16 分钟
- 30 天内合并 PR
- 1
描述
Steps to re-produce
1. Create a `prepare-commit-msg` hook:
``` #sh
#!/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`?
贡献指南
调研方向
使用提供的 prepare-commit-msg hook 重现问题,然后跟踪 git cz 如何调用 CLI,以及该 hook 是如何触发的。当运行 git cz 时只打开一次 Commitizen 向导,同时该 hook 仍能对 git commit 正常工作时,修复才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, javascript, shell
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100