Merge pull request #274 from kaitranntt/fix/websearch-hook-windows-compat

fix(websearch): use 'where' command on Windows for CLI detection
This commit is contained in:
Kai (Tam Nhu) Tran authored and GitHub committed 2026-01-05 09:40:05 -08:00
commit 23fea65329
1 file changed
+4 -1
+4 -1
View File
@@ -154,7 +154,10 @@ process.stdin.on('error', () => {
*/
function isCliAvailable(cmd) {
try {
const result = spawnSync('which', [cmd], {
const isWindows = process.platform === 'win32';
const whichCmd = isWindows ? 'where.exe' : 'which';
const result = spawnSync(whichCmd, [cmd], {
encoding: 'utf8',
timeout: 2000,
stdio: ['pipe', 'pipe', 'pipe'],