There was an error while loading. Please reload this page.
1 parent 5169f45 commit 681d78bCopy full SHA for 681d78b
1 file changed
pre_commit/xargs.py
@@ -25,7 +25,7 @@ def _environ_size(_env=None):
25
def _get_platform_max_length(): # pragma: no cover (platform specific)
26
if os.name == 'posix':
27
maximum = os.sysconf(str('SC_ARG_MAX')) - 2048 - _environ_size()
28
- maximum = min(maximum, 2 ** 17)
+ maximum = max(min(maximum, 2 ** 17), 2 ** 12)
29
return maximum
30
elif os.name == 'nt':
31
return 2 ** 15 - 2048 # UNICODE_STRING max - headroom
0 commit comments