evilmartians/lefthook

Support OpenBSD

Closed this issue · 8 comments

⚡ Summary

Use lefthook... on OpenBSD!

Value

I could work on projects that incorporate lefthook... on OpenBSD!

Behavior and configuration changes

When I run npx lefthook install, I shouldn't get

Cannot find module 'lefthook-openbsd-x64/bin/lefthook'

Looks like it builds fine using make build. Gonna see if I can manually insert it into node_modules to try it out with my codebase...

make test fails because -race isn't supported with go test on OpenBSD, but removing that, the only other test failure is TestUpdater_SelfUpdate/success... because OpenBSD binaries aren't published.

FWIW

Modifying node_modules/lefthook/get-exec.js to point to my binary built using make build and things are behaving exactly as I'd expect so far, FYI.

I'll pipe down until someone else more familiar with the project chimes in. 😄

Hey! Sounds good! I will add a build for OpenBSD 👍

Please, check if it works for you now

On the surface looks excellent, but after upgrading to 1.7.13, blasting my node_modules and re-installing with npm i, I still get

Error: Cannot find module 'lefthook-openbsd-x64/bin/lefthook'

Seems like npm i is not downloading the dependency for lefthook-openbsd-x64, as I only see node_modules/lefthook after npm i.

Can you manually do npm i lefthook-openbsd-x64?

Oh, it's because I forgot to add it as an optional dependency to the lefthook package. My bad, will fix next release.

Apologies for being late in following-up on this, but I tried out 1.7.14 (blasting node_modules first) and everything looks peachy keen. Thanks!