husky
husky copied to clipboard
Subsequent Init runs would clear Husky pre-commit
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