Skip to content

Skip lefthook entirely if no changes in folder #408

Answered by mrexox
stychu asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! Do I properly understand the issue: lefthook executes and skips the steps as expected, but its execution takes too long?

How is lefthook installed on your system? It feels that lefthook is executed with npx and that's why it takes so much time. If this is the issue, consider installing it globally with any supported way.

Is it added to package.json as an NPM package? In that case, could you provide the sample project structure? The main question is: where node_modules folder locates related to the git root? It might be that for some reason it doesn't find an executable in node_modules and moves to npx fallback.

Please, provide a lefthook.yml config, so I am sure I haven't missed anyt…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stychu
Comment options

Answer selected by stychu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants