Replies: 5 comments 1 reply
-
|
I had this issue with pre-commit as well, which really interrupted my workflow. Any solutions found for this? |
Beta Was this translation helpful? Give feedback.
-
|
Any update on this topic? |
Beta Was this translation helpful? Give feedback.
-
|
Hey! Did you try lefthook v1? Does the issue still persist on a new version? |
Beta Was this translation helpful? Give feedback.
-
|
Its still an issue, I use https://biomejs.dev/recipes/git-hooks/#lefthook, if I git commit from the bash terminal, it works fine, but if I use the vscode source control view to commit, it errors out: For context I use pnpm, so npm isn't installed through my package manager but pnpm's node version manager |
Beta Was this translation helpful? Give feedback.
-
|
I don't think this is an issue with lefthook, it appears to be a PATH issue. I faced this same issue in the past with a global-to-chained-local hooks workflow, this issue arises because hooks use It's worth noting that The solution for this is to ensure VSCode has access to the updated path before clicking the button, you can probably add an entry in lefthook's config, under all hooks that you use to source the file containing your environment variables (as long as they're not in My custom solution involves:
This results in VSCode's commit/push button working as expected when using lefthook. Edit 2: mrexox mentions the rc option here, a much more straightforward way to address this issue. #885 (comment) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is likely a documentation issue.
When using Lefthook Git hooks the commit flow is 'broken by the output generated by Lefthook (see below).
The consequence is that the commit is not made and the user is prompted with a dialog showing the first line of output captured
Lefthook v0.7.1.Appreciate any hints or tips on how to setup/use Lefthook with VSCode.
The VSCode
OUPUTwindow:Beta Was this translation helpful? Give feedback.
All reactions