Fixes xargs partition length on Windows for EXE hooks

This commit is contained in:
Alex Marvin 2024-02-07 21:17:07 -06:00 committed by GitHub
parent 73848383f2
commit 9da305e185
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -155,7 +155,7 @@ def xargs(
# on windows, batch files have a separate length limit than windows itself
if (
sys.platform == 'win32' and
cmd[0].lower().endswith(('.bat', '.cmd'))
cmd[0].lower().endswith(('.bat', '.cmd', '.exe'))
): # pragma: win32 cover
# this is implementation details but the command gets translated into
# full/path/to/cmd.exe /c *cmd

View file

@ -243,7 +243,7 @@ def test_xargs_color_true_makes_tty():
@pytest.mark.xfail(os.name == 'posix', reason='nt only')
@pytest.mark.parametrize('filename', ('t.bat', 't.cmd', 'T.CMD'))
@pytest.mark.parametrize('filename', ('t.bat', 't.cmd', 'T.CMD', 't.exe'))
def test_xargs_with_batch_files(tmpdir, filename):
f = tmpdir.join(filename)
f.write('echo it works\n')