MCPcopy Create free account
hub / github.com/StarsTom/mobileCodexHelper / run_powershell_json

Function run_powershell_json

mobile_codex_control.py:304–324  ·  view source on GitHub ↗
(command: str, timeout: int = 12)

Source from the content-addressed store, hash-verified

302
303
304def run_powershell_json(command: str, timeout: int = 12) -> Any | None:
305 result = run_command(
306 [
307 "powershell",
308 "-NoProfile",
309 "-ExecutionPolicy",
310 "Bypass",
311 "-Command",
312 command,
313 ],
314 timeout=timeout,
315 )
316 if result.returncode != 0:
317 return None
318 text = result.stdout.strip()
319 if not text:
320 return None
321 try:
322 return json.loads(text)
323 except json.JSONDecodeError:
324 return None
325
326
327def http_health(url: str, timeout: float = 2.5) -> tuple[bool, str]:

Callers 1

get_listener_mapFunction · 0.85

Calls 1

run_commandFunction · 0.85

Tested by

no test coverage detected