-
-
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
Subsequent Init runs would clear Husky pre-commit #1520
Comments
I have a similar requirement. I want my existing |
+1. Deprecating install and replacing it with something that does not do what install did is annoying. |
Init should be run only once. You can do the setup manually also. |
@typicode It "should" be run only once. But what if a dev runs it again, after changes on pre-commit file ? That's the meaning of my PR. |
Hi,
if I run "npx run init" after I've already changed pre-commit file in .husky/pre-commit, I lose my changes, it return to the "npm test"
I would suggest (going to send a PR) to create the pre-commit file only if it doesn't exists (so accidental multiple "npx run init" don't break changes).
Going to move the file creation into the try...catch, adding the flag "wx" (it raise an error if the file already exists)
regards
FabioG
The text was updated successfully, but these errors were encountered: