Pi Executable
Path:
loom-builder-sol/src/pi-executable.tsRelative: src/pi-executable.tsSubproject: loom-builder-solCategory: dispatch-system-solLines: 27Bytes: 861Imports: 1Exports: 3
Content Preview
- import { existsSync } from "node:fs";
- export interface PiExecutableCheck {
- ok: boolean;
- path: string;
- reason: string;
- }
- const WRONG_SYSTEM_PI = new Set(["/usr/bin/pi", "/bin/pi"]);
- export function validatePiExecutable(path: string | undefined): PiExecutableCheck {
- if (path === undefined || path === "") {
- return { ok: false, path: "", reason: "pi executable path is empty" };
- }
- if (WRONG_SYSTEM_PI.has(path)) {
- return { ok: false, path, reason: "resolved to the Linux math uti