()
| 72 | |
| 73 | |
| 74 | def detect_pi_bin() -> str: |
| 75 | direct = shutil_which("pi") |
| 76 | if direct: |
| 77 | return direct |
| 78 | prefix = subprocess.check_output(["npm", "prefix", "-g"], text=True).strip() |
| 79 | candidate = Path(prefix) / "bin" / "pi" |
| 80 | if candidate.exists(): |
| 81 | return str(candidate) |
| 82 | raise FileNotFoundError("could not find pi binary") |
| 83 | |
| 84 | |
| 85 | def build_specs() -> dict[str, ToolSpec]: |
no test coverage detected