-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Turborepo crashing with pre-commit hooks #8349
Comments
We are also encountering errors during the commit phase when using |
Hi, this is a duplicate of #8323, this should be fixed in the latest canary (2.0.2-canary.0). Feel free to re-open the issue if that's not the case. |
I tried with a Canary after what y suggested. It's not working. |
Gotcha, could you try adding |
Yeah, with the old UI it is working.. I can leave with that for now.. Thanks! |
Can you remove this line and see if that changes anything? Could you also try to provide a minimal reproduction repo? |
It's not working even without parallel. For the repro, I will try tomorrow evening as I am away from computer for a couple days. Sorry! |
I can confirm the bug with Turbo 2.0.3 on macOS. It did work prior 2.x my lefthook.yml: pre-commit:
parallel: false
commands:
check:
run: pnpm run check
pre-push:
parallel: true
commands:
check:
run: pnpm run check
test:
run: pnpm run test
name = "turbo"
operating_system = "Mac OS 14.5.0 [64-bit]"
crate_version = "2.0.3"
explanation = """
file 'crates/turborepo-lib/src/commands/run.rs' at line 57
"""
cause = "render thread panicked: JoinError::Panic(Id(24), ...)"
method = "Panic"
backtrace = """
0: 0x104d2eaa4 - __mh_execute_header
1: 0x1052ecdec - __mh_execute_header
2: 0x10535d7f4 - __mh_execute_header
3: 0x105358e4c - __mh_execute_header
4: 0x10573bd88 - __mh_execute_header
5: 0x10577edc4 - __mh_execute_header
6: 0x10577b4dc - __mh_execute_header
7: 0x1051ace68 - __mh_execute_header
8: 0x1051ab958 - __mh_execute_header
9: 0x1051ac554 - __mh_execute_header""" |
me too, in this issue! I can confirm the bug with Turbo 2.0.3 on macOS. turbo: 2.0.3 lefthook.yml:
and then this error log generated
luckly, i add this env, I fix the bug, but i can use new turbo ui.
|
Could everyone who encountered this issue try to use |
That worked but I don't think it used the new UI when running via the git hook.. Maybe I am wrong though. |
Yeah, that's intentional. Pre-commit tools like left hook open up a fake terminal that doesn't play well with our new UI. Unfortunately that does mean we need to fall back to the previous stream output |
Looks like this is resolved, closing. |
Verify canary release
Link to code that reproduces this issue
git commit -m ""
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.0.1, 2.0.2-canary.1
Describe the Bug
I have a pre-commit hook. I am using lefthook for it. I am using Biome for Linting and Vitest for testing. Here is the file..
If I run a
git commit -m "<COMMIT-MSG>"
it crashes. But if I run the commands individually and then commit again it passes. Here are some Logs that turborepo prompted me to post..Expected Behavior
I shouldn't need to run the commands individually in order for the commit hook to run the underline command without issue.
To Reproduce
I guess, we need a Monorepo with Pnpm, Turbo 2.0.1 and Lefthook. Important part here that this used to work as expected.
Additional context
No response
The text was updated successfully, but these errors were encountered: