-
Notifications
You must be signed in to change notification settings - Fork 220
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
Piped and parallel options have leftover console output #566
Comments
I'm also seeing weird control characters like
|
Hey, I'm also experiencing this. This is my pre-commit:
commands:
check:
run: npx biome check --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} This is extremely frustrating so I'm hoping it can be fixed! |
Hey! Do you only get this when you execute lefthook from within a lefthook command? Or does it also appears when having simple configuration? What terminal emulator do you use? Do you use tmux or some kind of multiplexer? |
I have a temporary solution for you. You should pass pre-commit:
piped: true
commands:
static-checks:
use_stdin: true
run: lefthook run static-checks
glob: "**/*.go" The problem I could identify is the following: https://github.com/creack/pty module that lefthook uses to get the output adds these sequences, and I'm not sure if there's a way to fix this. However when you specify |
Ok, I found the issue. Lefthook uses I will change the colors in the next release and this issue will be fixed. Stay tuned. |
@mrexox Hey there, thanks for looking into this! It looks like the text inserted into the prompt is fixed, but it looks like there's still some stuff being outputted. I'm not an expert with this kind of thing and am not 100% sure that it's lefthook. |
🔧 Summary
Using lefthook as described in #66 leads to leftover characters in the console. Things are otherwise working really well.
Lefthook version
1.5.2
Steps to reproduce
Using this
lefthook.yml
:Expected results
I expect my command prompt to be empty.
Actual results
The first two commands run with no problems. If there is only a change to a
.proto
file, the console is clear. However, any timestatic-checks
runs, this is the what's in my terminal:I'm not expecting my command prompt to include
11;rgb:2222/1a1a/0f0f5;1R
.Possible Solution
It looks like the git processing module is exiting early.
Logs / Screenshots
The text was updated successfully, but these errors were encountered: