vercel / git-hooks

No nonsense Git hook management
MIT License
200 stars 10 forks source link

hooks scripts stop working when `yarn` is update #4

Open nkzawa opened 5 years ago

nkzawa commented 5 years ago

It looks yarn path is hardcoded so that when it's updated and removed by like brew, scripts stop working. I think it's the same for node which the path is hardcoded. Is there are an easy way to update the scripts?

Qix- commented 5 years ago

Not via a convenient command. I think you're good to remove everything under .git/hooks, clear your node modules and npm i again. Upon install, we evaluate where the package manager is telling us it lives. If that path changes, you'll have to uninstall and reinstall.

Might work by doing npm uninstall @zeit/git-hooks; npm install --save-dev @zeit-hooks again. I'm not sure if npm has a "re-install" command that does just this.

nkzawa commented 5 years ago

👍 it seems npm uninstall @zeit/git-hooks; npm install --save-dev @zeit-hooks works. (tested with yarn).

I wonder if we can just use node and (npm or yarn) in path. so that you don't need to concern this problem.