Title: [Windows] webSearchTool 配置自定义脚本时 spawn 失败 (Node.js v24 已移除 .bat 自动路由) · Issue #190 · lessweb/deepcode-cli · GitHub
Open Graph Title: [Windows] webSearchTool 配置自定义脚本时 spawn 失败 (Node.js v24 已移除 .bat 自动路由) · Issue #190 · lessweb/deepcode-cli
X Title: [Windows] webSearchTool 配置自定义脚本时 spawn 失败 (Node.js v24 已移除 .bat 自动路由) · Issue #190 · lessweb/deepcode-cli
Description: 在 Windows 上配置 webSearchTool 指向 .bat 文件时,因 Node.js v20+ 已移除 child_process.spawn 对 .bat/.cmd 文件的自动 cmd.exe /c 路由,抛出 spawn EINVAL。 稳定复现步骤 创建任意 .bat 文件,例如: [bat] @echo off echo {"results":[{"title":"test"}]} 配置 settings.json: [json] "webSear...
Open Graph Description: 在 Windows 上配置 webSearchTool 指向 .bat 文件时,因 Node.js v20+ 已移除 child_process.spawn 对 .bat/.cmd 文件的自动 cmd.exe /c 路由,抛出 spawn EINVAL。 稳定复现步骤 创建任意 .bat 文件,例如: [bat] @echo off echo {"results":[{"title":"te...
X Description: 在 Windows 上配置 webSearchTool 指向 .bat 文件时,因 Node.js v20+ 已移除 child_process.spawn 对 .bat/.cmd 文件的自动 cmd.exe /c 路由,抛出 spawn EINVAL。 稳定复现步骤 创建任意 .bat 文件,例如: [bat] @echo off echo {"results":[{&...
Opengraph URL: https://github.com/lessweb/deepcode-cli/issues/190
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Windows] webSearchTool 配置自定义脚本时 spawn 失败 (Node.js v24 已移除 .bat 自动路由)","articleBody":" 在 Windows 上配置 webSearchTool 指向 .bat 文件时,因 Node.js v20+ 已移除 child_process.spawn 对 .bat/.cmd 文件的自动\n cmd.exe /c 路由,抛出 spawn EINVAL。\n\n 稳定复现步骤\n\n 1. 创建任意 .bat 文件,例如:\n [bat]\n @echo off\n echo {\"results\":[{\"title\":\"test\"}]}\n 2. 配置 settings.json:\n [json]\n \"webSearchTool\": \"C:/path/to/script.bat\"\n 3. 在对话中调用 WebSearch 工具\n 4. 结果:spawn EINVAL\n\n Node.js 验证\n\n [javascript]\n const { spawn } = require('child_process');\n spawn('C:/path/to/script.bat', ['query'], {\n stdio: ['ignore', 'pipe', 'pipe']\n });\n // → Error: spawn EINVAL (Node v24.15.0, Windows)\n\n 建议修复\n\n 在 src/tools/web-search-handler.ts 的 runWebSearchScript 中根据平台添加 shell: true:\n\n [diff]\n const child = spawn(scriptPath, [query], {\n cwd: context.projectRoot,\n + shell: process.platform === \"win32\",\n env: { ...process.env, ...configuredEnv },\n stdio: [\"ignore\", \"pipe\", \"pipe\"],\n });","author":{"url":"https://github.com/user-lzy","@type":"Person","name":"user-lzy"},"datePublished":"2026-06-22T05:19:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/190/deepcode-cli/issues/190"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d34d72f3-13ab-39fa-8d85-8529eeeaa47d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2FE:2D8184:893A99:C80CE9:6A4E150E |
| html-safe-nonce | 33898111663ac79b32b655afc1adc2328e9be263577b4205c5127423d287b755 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkZFOjJEODE4NDo4OTNBOTk6QzgwQ0U5OjZBNEUxNTBFIiwidmlzaXRvcl9pZCI6IjY2NzcxODg3NjY5ODM5MTg4NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ab6e9663a059a916e05e5a01e47ac12b9b95d310f4a66555ba06c3456314f845 |
| hovercard-subject-tag | issue:4713678224 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lessweb/deepcode-cli/190/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1476d3d2e56c355dd6834679e517d1f9f56339a621f0a686b6ecaed2acf35834/lessweb/deepcode-cli/issues/190 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1476d3d2e56c355dd6834679e517d1f9f56339a621f0a686b6ecaed2acf35834/lessweb/deepcode-cli/issues/190 |
| og:image:alt | 在 Windows 上配置 webSearchTool 指向 .bat 文件时,因 Node.js v20+ 已移除 child_process.spawn 对 .bat/.cmd 文件的自动 cmd.exe /c 路由,抛出 spawn EINVAL。 稳定复现步骤 创建任意 .bat 文件,例如: [bat] @echo off echo {"results":[{"title":"te... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | user-lzy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ea9187571e3edc5f2780f750631138669441ca50 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width