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

Fix finding lefthook binary under node_modules #190

Closed
wants to merge 1 commit into from

Conversation

aminya
Copy link
Contributor

@aminya aminya commented May 15, 2021

In #184, the lefthook sh file was removed, but the Node package managers create one automatically under node_modules/.bin. This fixes finding binaries under node_modules no matter what package manager is used.

It also fixes finding binaries for the cases where $dir has spaces in it (allowed on Windows)

@aminya aminya force-pushed the node_modules-binary branch 3 times, most recently from ae71337 to 77329f7 Compare May 15, 2021 14:31
@aminya aminya changed the title Fix finding left-hook binary under node_modules Fix finding binaries under node_modules May 15, 2021
@aminya aminya force-pushed the node_modules-binary branch 3 times, most recently from ad212c7 to e4d45dd Compare May 15, 2021 14:41
No matter what package manager is used, the binaries will be always under node_modules/.bin.

The previous script only worked with "npm" which hoists the dependencies to node_modules.

It also fixes finding binaries for the cases where $dir has spaces in it
@aminya aminya changed the title Fix finding binaries under node_modules Fix finding lefthook binary under node_modules May 15, 2021
@aminya
Copy link
Contributor Author

aminya commented May 15, 2021

This doesn't seem to work. I made a commit in #188 that supersedes this PR:
d0e8d2e

@aminya aminya closed this May 15, 2021
@aminya aminya deleted the node_modules-binary branch May 15, 2021 16:56
@aminya aminya restored the node_modules-binary branch May 15, 2021 16:56
@aminya aminya deleted the node_modules-binary branch May 15, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant