Skip to content

Commit 928b733

Browse files
committed
Print response file contents
1 parent 04cc446 commit 928b733

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ports/zephyr-cp/cptools/cpbuild.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ async def run_command(
137137
If None, commands that are too long will fail.
138138
"""
139139
paths = []
140+
responsefile_contents = None
140141
if isinstance(command, list):
141142
for i, part in enumerate(command):
142143
if isinstance(part, pathlib.Path):
@@ -149,8 +150,9 @@ async def run_command(
149150

150151
# When on windows, use a responsefile if the command string is >= 8192
151152
if os.name == "nt" and len(command_string) >= 8192:
152-
responsefile.write_text("\n".join(command[1:]))
153-
command_string = f"{command[0]} @{responsefile}"
153+
responsefile_contents = "\n".join(command[1:])
154+
responsefile.write_text(responsefile_contents)
155+
command_string = f"{command[0]} -v @{responsefile}"
154156
else:
155157
command_string = command
156158

@@ -269,6 +271,8 @@ async def run_command(
269271
if command_hash in LAST_BUILD_TIMES:
270272
del LAST_BUILD_TIMES[command_hash]
271273
logger.error(command_string)
274+
if responsefile_contents:
275+
logger.error(f"Response file contents:\n{responsefile_contents}")
272276
logger.error(f"Return code: {process.returncode}")
273277
if stdout:
274278
logger.info(stdout.decode("utf-8").strip())

0 commit comments

Comments
 (0)