@oh-my-pi/pi-coding-agent 1.337.1 → 1.340.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,14 +95,9 @@ const TOOLS: Record<string, ToolConfig> = {
95
95
  },
96
96
  };
97
97
 
98
- // Check if a command exists in PATH by trying to run it
99
- function commandExists(cmd: string): boolean {
100
- try {
101
- const proc = Bun.spawnSync([cmd, "--version"], { stdin: "ignore", stdout: "pipe", stderr: "pipe" });
102
- return proc.exitCode !== null;
103
- } catch {
104
- return false;
105
- }
98
+ // Check if a command exists in PATH
99
+ function commandExists(cmd: string): string | null {
100
+ return Bun.which(cmd);
106
101
  }
107
102
 
108
103
  // Get the path to a tool (system-wide or in our tools dir)
@@ -116,12 +111,8 @@ export function getToolPath(tool: "fd" | "rg" | "sd" | "sg"): string | null {
116
111
  return localPath;
117
112
  }
118
113
 
119
- // Check system PATH - if found, just return the command name (it's in PATH)
120
- if (commandExists(config.binaryName)) {
121
- return config.binaryName;
122
- }
123
-
124
- return null;
114
+ // Check system PATH
115
+ return commandExists(config.binaryName);
125
116
  }
126
117
 
127
118
  // Fetch latest release version from GitHub