mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Merge pull request #1864 from pre-commit/batch_additional_headroom
give xargs batch file execution additional headroom
This commit is contained in:
commit
008717fcc9
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,9 @@ def xargs(
|
|||
# this is implementation details but the command gets translated into
|
||||
# full/path/to/cmd.exe /c *cmd
|
||||
cmd_exe = parse_shebang.find_executable('cmd.exe')
|
||||
_max_length = 8192 - len(cmd_exe) - len(' /c ')
|
||||
# 1024 is additionally subtracted to give headroom for further
|
||||
# expansion inside the batch file
|
||||
_max_length = 8192 - len(cmd_exe) - len(' /c ') - 1024
|
||||
|
||||
partitions = partition(cmd, varargs, target_concurrency, _max_length)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue