-
Hi, I just found about left hook and would like to use it in my company project. I managed to skipp the commands if not changes in How can I prevent lefthook from running in such case? Providing LEFTHOOK=0 git commit ... manually is NOT an option. I need this to be automatic based on changes from |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 Is it added to Please, provide a The general answer to your question is the following: lefthook must read the config to skip, so it must be executed at least to skip execution. So, the problem is - it should not take so much time just to be executed and skip. |
Beta Was this translation helpful? Give feedback.
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: wherenode_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 tonpx
fallback.Please, provide a
lefthook.yml
config, so I am sure I haven't missed anyt…