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

Improve call_lefthook #250

Closed
muuvmuuv opened this issue Dec 22, 2021 · 4 comments · Fixed by #393
Closed

Improve call_lefthook #250

muuvmuuv opened this issue Dec 22, 2021 · 4 comments · Fixed by #393

Comments

@muuvmuuv
Copy link

When only using pnpm call_lefthook takes 20 seconds to call, because npx just takes so long.

Solution is adding pnpm before npx (and maybe move yarn before npx too) so these can call node_modules bin before using npx.

@muuvmuuv
Copy link
Author

Oh, wait, I see there already is this elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" but anyway this binary does not exist. See:

Bildschirmfoto 2021-12-22 um 09 32 13

So, this needs a fix too.

It would be way simple to add this, IMO: $dir/node_modules/.bin/lefthook. Because all package managers in node follow this spec.

@amertak
Copy link

amertak commented Jul 25, 2022

I am experiencing the same issue, it takes too long to call it using npx.

@apathetic
Copy link

Do we know why the PR was closed? I'd love to see a solve for pnpm, at the very least

@muuvmuuv muuvmuuv changed the title Add pnpm to call_lefthook Improve call_lefthook Sep 9, 2022
@muuvmuuv
Copy link
Author

muuvmuuv commented Sep 9, 2022

I think the best way is to completely avoid dynamic installing lefthook like with npx and just stick with what could be locally installed and otherwise exit with a hint.

I don't know why it was closed but maybe because of bad grammar or typos or style idk.

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 a pull request may close this issue.

3 participants