Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/mcp/mcp-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ export class McpClient {
// On Windows, shell: true lets cmd.exe resolve the command via
// PATHEXT (npx → npx.cmd, etc.) without blindly appending .cmd,
// which would break absolute paths like process.execPath.
this.process = spawn(this.command, args, {
// Join command+args into a single string to avoid Node.js DEP0190
// deprecation warning (passing args array with shell:true).
this.process = spawn([this.command, ...args].join(" "), [], {
stdio: ["pipe", "pipe", "pipe"],
env: childEnv,
shell: true,
Expand Down
4 changes: 2 additions & 2 deletions src/updateCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async function promptUpdateChoice({

async function runNpmInstallGlobal(installSpec: string): Promise<boolean> {
return new Promise((resolve) => {
const child = spawn("npm", ["install", "-g", installSpec], {
const child = spawn(["npm", "install", "-g", installSpec].join(" "), [], {
stdio: "inherit",
shell: process.platform === "win32",
});
Expand Down Expand Up @@ -205,7 +205,7 @@ function runNpmViewLatestVersion(
if (registry) {
args.push("--registry", registry);
}
const child = spawn("npm", args, {
const child = spawn(["npm", ...args].join(" "), [], {
stdio: ["ignore", "pipe", "pipe"],
shell: process.platform === "win32",
});
Expand Down
Loading