-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Chunks tasks can't load csx files in parallel. #93
Comments
I created test repo - https:/AlaiyaNetwork/TestHuskyChunksError This is funny console project create a lot of .cs files. Husky have 3 tasks:
|
alirezanet
added a commit
that referenced
this issue
Sep 19, 2023
Hi @AlaiyaNetwork, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #92
Originally posted by AlaiyaNetwork September 18, 2023
Hi all, I encountered a few errors when using pre-commit hook with a large number of files in a commit.
1 error:
fatal: Unable to create 'C:/WorkDirectory/.git/index.lock': File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.
2 error:
The process cannot access the file 'C:\WorkDirectory\.husky\csx\add-header-to-main.csx' because it is being used by another process.
The first error also occurs when using prettier, not only with custom scripts. But it doesn't cause the script to abort
[Husky] ⚡ Preparing task 'Run prettier'
[Husky] ⚠️ The Maximum argument length '8191' reached, splitting matched files into 16 chunks
[Husky] ⌛ Executing task 'Run prettier' ...
fatal: Unable to create 'C:/WorkDirectory/.git/index.lock': File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.
[Husky] ✔ Successfully executed in 2 304ms
This is my custom script:
[Husky] ⚡ Preparing task 'Run add header to main script'
[Husky] ⚠️ The Maximum argument length '8191' reached, splitting matched files into 9 chunks
[Husky] ⌛ Executing task 'Run add header to main script' ...
The process cannot access the file 'C:\WorkDirectory\.husky\csx\add-header-to-main.csx' because it is being used by another process.
The process cannot access the file 'C:\WorkDirectory\.husky\csx\add-header-to-main.csx' because it is being used by another process.
The process cannot access the file 'C:\WorkDirectory\.husky\csx\add-header-to-main.csx' because it is being used by another process.
The process cannot access the file 'C:\WorkDirectory\.husky\csx\add-header-to-main.csx' because it is being used by another process.
fatal: Unable to create 'C:/WorkDirectory/.git/index.lock': File exists. Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.
❌ Task 'Run add header to main script' failed in 487ms
husky - pre-commit hook exited with code 1 (error)
Prettier task:
{ "name": "Run prettier", "command": "npx", "cwd": "Paylater.BackOffice.ReactApp", "args": [ "prettier", "--plugin", "prettier-plugin-organize-imports", "--ignore-unknown", "--write", "${staged}" ], "pathMode": "absolute" }
Maybe someone has encountered a similar problem and can give me a solution.
The text was updated successfully, but these errors were encountered: