Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenBSD #807

Closed
neezer opened this issue Aug 15, 2024 · 8 comments · Fixed by #808
Closed

Support OpenBSD #807

neezer opened this issue Aug 15, 2024 · 8 comments · Fixed by #808
Labels
feature request A new lefthook feature description

Comments

@neezer
Copy link

neezer commented Aug 15, 2024

⚡ 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'
@neezer neezer added the feature request A new lefthook feature description label Aug 15, 2024
@neezer
Copy link
Author

neezer commented Aug 15, 2024

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

@neezer
Copy link
Author

neezer commented Aug 15, 2024

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. 😄

@mrexox
Copy link
Member

mrexox commented Aug 16, 2024

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

@mrexox mrexox mentioned this issue Aug 16, 2024
2 tasks
@mrexox
Copy link
Member

mrexox commented Aug 16, 2024

Please, check if it works for you now

@neezer
Copy link
Author

neezer commented Aug 17, 2024

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.

@mrexox mrexox reopened this Aug 17, 2024
@mrexox
Copy link
Member

mrexox commented Aug 17, 2024

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

@mrexox
Copy link
Member

mrexox commented Aug 17, 2024

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

@mrexox mrexox closed this as completed Aug 17, 2024
@neezer
Copy link
Author

neezer commented Aug 23, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A new lefthook feature description
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants