环境
- deepcode-cli: 0.1.24
- Node.js: v24.15.0
- OS: Windows 11
问题
启动 deepcode 后出现弃用警告:
(node:14456) [DEP0190] DeprecationWarning: Passing args to a child process
with shell option true can lead to security vulnerabilities, as the arguments
are not escaped, only concatenated.
原因
cli.js 中 MCP 子进程启动代码使用了 child_process.spawn(command, args, { shell: true })。Node 24 开始对此报警。
建议修复
去掉 shell: true,直接使用 args 数组:
spawn(command, args, { ...opts }) // shell 默认 false
而不是:
spawn(command, args, { shell: true, ...opts })
环境
问题
启动 deepcode 后出现弃用警告:
(node:14456) [DEP0190] DeprecationWarning: Passing args to a child process
with shell option true can lead to security vulnerabilities, as the arguments
are not escaped, only concatenated.
原因
cli.js 中 MCP 子进程启动代码使用了
child_process.spawn(command, args, { shell: true })。Node 24 开始对此报警。建议修复
去掉
shell: true,直接使用 args 数组:spawn(command, args, { ...opts }) // shell 默认 false
而不是:
spawn(command, args, { shell: true, ...opts })