chore(pi): drop obsolete tool validation patch

This commit is contained in:
2026-09-14 20:29:37 -04:00
parent 212ed506a2
commit e65eb8389f

View File

@@ -72,8 +72,8 @@ const TOOLS: Record<string, ToolConfig> = {
function commandExists(cmd: string): boolean { function commandExists(cmd: string): boolean {
try { try {
const result = spawnSync(cmd, ["--version"], { stdio: "pipe" }); const result = spawnSync(cmd, ["--version"], { stdio: "pipe" });
// Downloaded generic Linux binaries can exist but fail on NixOS before they print a version. // Check for ENOENT error (command not found)
return (result.error === undefined || result.error === null) && result.status === 0; return result.error === undefined || result.error === null;
} catch { } catch {
return false; return false;
} }
@@ -86,7 +86,7 @@ export function getToolPath(tool: "fd" | "rg"): string | null {
// Check our tools directory first // Check our tools directory first
const localPath = join(TOOLS_DIR, config.binaryName + (platform() === "win32" ? ".exe" : "")); const localPath = join(TOOLS_DIR, config.binaryName + (platform() === "win32" ? ".exe" : ""));
if (existsSync(localPath) && commandExists(localPath)) { if (existsSync(localPath)) {
return localPath; return localPath;
} }