bahmutov / pre-git

Automatically install pre-commit / pre-push hooks in your git repo
168 stars 22 forks source link

Can't remove dependency without breaking git #169

Open Mattsi-Jansky opened 5 years ago

Mattsi-Jansky commented 5 years ago

We want to remove the pre-git dependency from one of our repos that's used semi-regularly across two big teams. The problem we've found is that the pre-commit hooks have already been installed in the repo checkouts of anyone that has built it before. Thus, if we remove the dependency all of their git actions will fail because ./node_modules/.bin/commit-msg is missing.

This would be really simple to fix by wrapping ./node_modules/.bin/commit-msg in a if clause, and make removing this dependency much easier.