Chunks errors #92
Replies: 2 comments 4 replies
-
Hi @AlaiyaNetwork, regarding the first error: try to remove the index.lock file, and see if it is solved.
regarding the second error: can you echo your staged files instead? just want to make sure that the problem is related to csx execution or not, something like:
Since I don't have a unit test covering this scenario I believe this might be a bug, |
Beta Was this translation helpful? Give feedback.
4 replies
-
It is fixed in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions