container: Report tool installer failures without a traceback
A failing official installer aborted with a raw CalledProcessError traceback, burying the actual problem the installer had already printed to the terminal. Exit with a short message pointing at that output instead.
This commit is contained in:
parent
1fd877bdae
commit
cc5c2b14a8
1 changed files with 14 additions and 7 deletions
|
|
@ -243,6 +243,7 @@ class AgentContainer:
|
|||
f"Installing {tool} into the container home "
|
||||
"(official installer, no sudo)..."
|
||||
)
|
||||
try:
|
||||
subprocess.run(
|
||||
[
|
||||
"docker", "exec", self.container_name, "bash", "-lc",
|
||||
|
|
@ -250,6 +251,12 @@ class AgentContainer:
|
|||
],
|
||||
check=True,
|
||||
)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error(
|
||||
f"Installing {tool} failed with exit status "
|
||||
f"{e.returncode}; see the installer output above."
|
||||
)
|
||||
sys.exit(1)
|
||||
paths = spec["path"] if isinstance(spec["path"], list) else [spec["path"]]
|
||||
for path_expr in paths:
|
||||
self._ensure_path_entry(path_expr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue