-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
"prepare": "husky" 每次下载依赖的时候会覆盖钩子文件 #1462
Comments
I noticed this too, I wonder if there should be something that makes the behavior conditional. |
Actually this is the behavior I want to have. So that I can enforce linting rules to the team automatically. But it doesn't happen using yarn v4.1.1. The prepare script doesn't run at all unless called manually like |
Yarn is a special case, check docs |
This does not sort out the situation with npm, though. Right? |
目前使用的版本是:9.0.11
由于package.json中配置了"prepare": "husky",
团队其他成员从仓库中拉取代码后,执行npm install后会自动重新创建.husky目录,包括里面的文件都会被覆盖。
这就意味着,如果我在.husky/pre-commit 中定义了自己的东西,那么别人在安装依赖的时候,就被把这些自定义的内容覆盖掉。
The text was updated successfully, but these errors were encountered: