We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When running a git command that invoke a hook handled by lefthook, the command will fail on the mkdir call here
mkdir
This fails here, but all git calls should have the same issue.
1.6.12 e87cc77f7d91893d701ae6dece10c65c32974555
run GIT_TRACE=1 git push
GIT_TRACE=1 git push
Lefthook should not break when GIT_TRACE=1 is set.
GIT_TRACE=1
Lefthook does not correctly handle Stderr on git commands.
I believe the issue is that git rev-parse --git-path info called above captures Stderr in the same buffer that Stdout is expected.
git rev-parse --git-path info
GIT_TRACE=1 LEFTHOOK_VERBOSE=1 git push ... │ [lefthook] cmd: [git rev-parse --git-path info] │ [lefthook] dir: │ [lefthook] err: <nil> │ [lefthook] out: 13:45:15.686852 git.c:460 trace: built-in: git rev-parse --git-path info .git/info Error: mkdir 13:45:15.686852 git.c:460 trace: built-in: git rev-parse --git-path info .git/info: no such file or directory
The text was updated successfully, but these errors were encountered:
Thank you for creating this issue. I am preparing a refactoring that will cover this case: stderr will be redirected to OS' stderr directly.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🔧 Summary
When running a git command that invoke a hook handled by lefthook, the command will fail on the
mkdir
call hereThis fails here, but all git calls should have the same issue.
Lefthook version
1.6.12 e87cc77f7d91893d701ae6dece10c65c32974555
Steps to reproduce
run
GIT_TRACE=1 git push
Expected results
Lefthook should not break when
GIT_TRACE=1
is set.Actual results
Lefthook does not correctly handle Stderr on git commands.
Possible Solution
I believe the issue is that
git rev-parse --git-path info
called above captures Stderr in the same buffer that Stdout is expected.Logs / Screenshots
The text was updated successfully, but these errors were encountered: