Skip to content

Commit 9eacb21

Browse files
committed
show 1000 chars on failure with idf_tools.py
1 parent 89c4c13 commit 9eacb21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

platform.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,15 @@ def _run_idf_tools_install(self, tools_json_path: str, idf_tools_path: str, penv
428428
logger.info(f"Installing tools via idf_tools.py (this may take several minutes)...")
429429
result = subprocess.run(
430430
cmd,
431-
stdout=subprocess.DEVNULL,
432-
stderr=subprocess.DEVNULL,
431+
stdout=subprocess.PIPE,
432+
stderr=subprocess.PIPE,
433+
text=True,
433434
check=False
434435
)
435436

436437
if result.returncode != 0:
437-
logger.error("idf_tools.py installation failed")
438+
tail = (result.stderr or result.stdout or "").strip()[-1000:]
439+
logger.error("idf_tools.py installation failed (rc=%s). Tail:\n%s", result.returncode, tail)
438440
return False
439441

440442
logger.debug("idf_tools.py executed successfully")

0 commit comments

Comments
 (0)