diff --git a/package.json b/package.json index 8e0cb8f..023d57a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "testemonials" ], "scripts": { - "postinstall": "node dist/track-installation.js && node dist/npm-scripts/verify-ripgrep.js || true", + "postinstall": "node dist/track-installation.js && node dist/npm-scripts/verify-ripgrep.js || node -e \"process.exit(0)\"", "open-chat": "open -n /Applications/Claude.app", "sync-version": "node scripts/sync-version.js", "bump": "node scripts/sync-version.js --bump", @@ -32,7 +32,7 @@ "watch": "tsc --watch", "start": "node dist/index.js", "start:debug": "node --inspect-brk=9229 dist/index.js", - "setup": "npm install && npm run build && node setup-claude-server.js", + "setup": "npm install --include=dev && npm run build && node setup-claude-server.js", "setup:debug": "npm install && npm run build && node setup-claude-server.js --debug", "remove": "npm install && npm run build && node uninstall-claude-server.js", "prepare": "npm run build", diff --git a/src/utils/ripgrep-resolver.ts b/src/utils/ripgrep-resolver.ts index 3ae8e99..e393204 100644 --- a/src/utils/ripgrep-resolver.ts +++ b/src/utils/ripgrep-resolver.ts @@ -33,10 +33,11 @@ export async function getRipgrepPath(): Promise { // @vscode/ripgrep import or binary resolution failed, continue to fallbacks } - // Strategy 2: Try system ripgrep using 'which' command + // Strategy 2: Try system ripgrep using 'which' (Unix) or 'where' (Windows) try { const systemRg = process.platform === 'win32' ? 'rg.exe' : 'rg'; - const result = execSync(`which ${systemRg}`, { encoding: 'utf-8' }).trim(); + const whichCmd = process.platform === 'win32' ? 'where' : 'which'; + const result = execSync(`${whichCmd} ${systemRg}`, { encoding: 'utf-8' }).trim().split(/\r?\n/)[0]; if (result && existsSync(result)) { cachedRgPath = result; return result;