diff --git a/agent-container.py b/agent-container.py index ba76ea3..4bc8eb4 100755 --- a/agent-container.py +++ b/agent-container.py @@ -243,13 +243,20 @@ class AgentContainer: f"Installing {tool} into the container home " "(official installer, no sudo)..." ) - subprocess.run( - [ - "docker", "exec", self.container_name, "bash", "-lc", - spec["install"], - ], - check=True, - ) + try: + subprocess.run( + [ + "docker", "exec", self.container_name, "bash", "-lc", + spec["install"], + ], + 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)