chore(pi): drop obsolete tool validation patch
This commit is contained in:
@@ -72,8 +72,8 @@ const TOOLS: Record<string, ToolConfig> = {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user