fix(websearch): run .bat custom scripts via shell on Windows (#190) - #274
Open
innocarpe wants to merge 1 commit into
Open
fix(websearch): run .bat custom scripts via shell on Windows (#190)#274innocarpe wants to merge 1 commit into
innocarpe wants to merge 1 commit into
Conversation
…#190) Node.js v20+ removed the automatic cmd.exe routing for .bat/.cmd files, causing spawn EINVAL for webSearchTool scripts pointing at .bat files. Enable shell on win32 only. (cherry picked from commit 3fe982c5f0a169e07464810e7befeef26d2f90b6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webSearchToolscripts pointing at.batfiles now run on Windows instead of failing withspawn EINVAL.Why
Node.js v20+ removed the automatic
cmd.exerouting for.bat/.cmdfiles, sochild_process.spawnof a.batpath throwsEINVALon Windows. This broke the configured web-search script path for Windows users.Changes
packages/core/src/tools/web-search-handler.ts: passshell: process.platform === "win32"tospawnso.batscripts execute throughcmd.exeon Windows only (POSIX behavior unchanged).packages/core/src/tests/web-search-handler.test.ts: Windows-only test running a.batscript (skipped elsewhere).Validation
npm run typecheck✅npm test— existing web-search tests still pass; new.battest runs on Windows ✅Closes #190