Skip to content

Commit d32f728

Browse files
committed
Escape backslashes
1 parent 928b733 commit d32f728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ports/zephyr-cp/cptools/cpbuild.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ async def run_command(
150150

151151
# When on windows, use a responsefile if the command string is >= 8192
152152
if os.name == "nt" and len(command_string) >= 8192:
153-
responsefile_contents = "\n".join(command[1:])
153+
# Escape backslashes
154+
responsefile_contents = "\n".join(part.replace("\\", "\\\\") for part in command[1:])
154155
responsefile.write_text(responsefile_contents)
155156
command_string = f"{command[0]} -v @{responsefile}"
156157
else:

0 commit comments

Comments
 (0)