MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / run_command

Function run_command

start_webui.py:83–94  ·  view source on GitHub ↗
(command: Iterable[str], *, capture_output: bool = False, check: bool = True)

Source from the content-addressed store, hash-verified

81
82
83def run_command(command: Iterable[str], *, capture_output: bool = False, check: bool = True) -> subprocess.CompletedProcess[str]:
84 result = subprocess.run(
85 list(command),
86 cwd=PROJECT_ROOT,
87 text=True,
88 capture_output=capture_output,
89 )
90 if check and result.returncode != 0:
91 detail = (result.stderr or result.stdout or "").strip()
92 joined = " ".join(command)
93 raise LaunchError(f"命令执行失败: {joined}\n{detail}")
94 return result
95
96
97def docker_ready() -> bool:

Callers 1

ensure_postgres_serviceFunction · 0.85

Calls 2

LaunchErrorClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected