MCPcopy Create free account
hub / github.com/AGenUI/AGenUI / check_tool

Function check_tool

scripts/run_tests.py:106–116  ·  view source on GitHub ↗

检查命令行工具是否可用

(tool: str)

Source from the content-addressed store, hash-verified

104
105
106def check_tool(tool: str) -> bool:
107 """检查命令行工具是否可用"""
108 try:
109 subprocess.run(
110 [tool, "--version"],
111 capture_output=True,
112 timeout=10,
113 )
114 return True
115 except (FileNotFoundError, subprocess.TimeoutExpired):
116 return False
117
118
119# ─── C++ 测试 ────────────────────────────────────────────────────────────────

Callers 1

run_harmony_testsFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected