evilmartians / lefthook

Fast and powerful Git hooks manager for any type of projects.
MIT License
4.66k stars 211 forks source link

Error message when lefthook is older could include more info #718

Closed technicalpickles closed 3 months ago

technicalpickles commented 3 months ago

:zap: Summary

If you have a min_version in lefthook.yml, and try to run a hook using it, you get a failure like:

Error: required Lefthook version is higher than current

I'd propose adding some info like:

Value

This would make it easier to help someone figure out why it's failing.

One example I have run into is with having both homebrew and gem installed lefthook... if you use rbenv or another shim based ruby version manager, you typically would have that on the PATH before a homebrew installed one, and it's really easy for those to get out of sync.

Behavior and configuration changes

mrexox commented 3 months ago

That's a good improvement! Thank you. I will try to achieve this but your PR is also welcome.