From e65eb8389fe95604af846dd86cabff5536fb504c Mon Sep 17 00:00:00 2001 From: alexion Date: Mon, 14 Sep 2026 20:29:37 -0400 Subject: [PATCH] chore(pi): drop obsolete tool validation patch --- .../pi/packages/coding-agent/src/utils/tools-manager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/pi/packages/coding-agent/src/utils/tools-manager.ts b/third_party/pi/packages/coding-agent/src/utils/tools-manager.ts index 2bcca47..f040f52 100644 --- a/third_party/pi/packages/coding-agent/src/utils/tools-manager.ts +++ b/third_party/pi/packages/coding-agent/src/utils/tools-manager.ts @@ -72,8 +72,8 @@ const TOOLS: Record = { function commandExists(cmd: string): boolean { try { const result = spawnSync(cmd, ["--version"], { stdio: "pipe" }); - // Downloaded generic Linux binaries can exist but fail on NixOS before they print a version. - return (result.error === undefined || result.error === null) && result.status === 0; + // Check for ENOENT error (command not found) + return result.error === undefined || result.error === null; } catch { return false; } @@ -86,7 +86,7 @@ export function getToolPath(tool: "fd" | "rg"): string | null { // Check our tools directory first const localPath = join(TOOLS_DIR, config.binaryName + (platform() === "win32" ? ".exe" : "")); - if (existsSync(localPath) && commandExists(localPath)) { + if (existsSync(localPath)) { return localPath; }