in windows, xargs.py too large command line #1604
Comments
can you share your config and output and log? that value has been pretty thoroughly tested -- my guess is some underlying tool is expanding furthur in an incorrect way but I can't tell without you showing me anything |
i use https://github.com/macisamuele/language-formatters-pre-commit-hooks and report error |
no no, show me your configuration, the command you ran, the output you get from that command, and the error log pre-commit generates |
myconfig:
run: have many java, so error message 命令行太长 |
can you show the full outout please. show the whole thing I don't particularly care if it is not english |
Hello @asottile, I have pretty the same issue:
It was executed on Windows 10, python 3.9 and pre-commit 2.8.2 |
do you have a repository to link to? that's prettier giving that result and not python, python's error looks like: |
@asottile I can send only a config of pre-commit:
Based on my invastigation there is an issue with executing a command to run the prettier hook. It's easy to reproduce:
pre-commit command executes a .CMD file with command which contains ~30k chars (of course it is greater than the limit). |
hmmm so you're saying any |
@asottile Yeah, from my tests it looks like that. I've tested it on two different machines with Win10, and i've got the same error when the command is larger than ~8k chars |
hmmm ok, I've made #1686 to fix this, I've also figured out exactly the limit for cmd, it has to do with the full path to |
@asottile Thanks a lot, i'm waiting for a new version. |
if you don't want to wait, you can |
I use pre-commit to check java in windows
pre-commit run -a
get
The command line is too long.
I find xargs.py _get_platform_max_length too large size
I change it ,then can run
The text was updated successfully, but these errors were encountered: