Skip to content

Commit 20eac8f

Browse files
authored
add error message for esptool
1 parent e481660 commit 20eac8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

builder/penv_setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ def install_esptool(env, platform, python_exe, uv_executable):
258258
"""
259259
esptool_repo_path = env.subst(platform.get_package_dir("tool-esptoolpy") or "")
260260
if not esptool_repo_path or not os.path.isdir(esptool_repo_path):
261+
sys.stderr.write(
262+
f"Error: 'tool-esptoolpy' package directory not found: {esptool_repo_path!r}\n"
263+
)
261264
sys.exit(1)
262265

263266
# Check if esptool is already installed from the correct path
@@ -293,7 +296,10 @@ def install_esptool(env, platform, python_exe, uv_executable):
293296
"-e", esptool_repo_path
294297
])
295298

296-
except subprocess.CalledProcessError:
299+
except subprocess.CalledProcessError as e:
300+
sys.stderr.write(
301+
f"Error: Failed to install esptool from {esptool_repo_path} (exit {e.returncode})\n"
302+
)
297303
sys.exit(1)
298304

299305

0 commit comments

Comments
 (0)