From f4319f670cdb56423f0e841a470cb116364b1fdc Mon Sep 17 00:00:00 2001 From: newmansnj <110606942+newmansnj@users.noreply.github.com> Date: Fri, 9 Feb 2024 07:20:40 +0100 Subject: [PATCH] Update piomaxlen.py change from 8192 to 8191 MAX_LINE_LENGTH (#4856) The maximum length of the string that you can use at the command prompt is 8191 characters. This limitation applies to: the command line individual environment variables that are inherited by other processes, such as the PATH variable all environment variable expansions If you use Command Prompt to run batch files, this limitation also applies to batch file processing. https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation#:~:text=The%20maximum%20length%20of%20the,such%20as%20the%20PATH%20variable --- platformio/builder/tools/piomaxlen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/builder/tools/piomaxlen.py b/platformio/builder/tools/piomaxlen.py index d20879eb..8d45317c 100644 --- a/platformio/builder/tools/piomaxlen.py +++ b/platformio/builder/tools/piomaxlen.py @@ -23,10 +23,10 @@ from SCons.Subst import quote_spaces # pylint: disable=import-error from platformio.compat import IS_WINDOWS, hashlib_encode_data # There are the next limits depending on a platform: -# - Windows = 8192 +# - Windows = 8191 # - Unix = 131072 # We need ~512 characters for compiler and temporary file paths -MAX_LINE_LENGTH = (8192 if IS_WINDOWS else 131072) - 512 +MAX_LINE_LENGTH = (8191 if IS_WINDOWS else 131072) - 512 WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)")