检查系统命令是否存在 — 源码 sandbox.rs:280-283
(command: str)
| 201 | |
| 202 | |
| 203 | def command_exists(command: str) -> bool: |
| 204 | """检查系统命令是否存在 — 源码 sandbox.rs:280-283""" |
| 205 | path_dirs = os.environ.get("PATH", "").split(os.pathsep) |
| 206 | return any(os.path.exists(os.path.join(d, command)) for d in path_dirs) |
| 207 | |
| 208 | |
| 209 | def normalize_mounts(mounts: List[str], cwd: Path) -> List[str]: |
no test coverage detected