From de16a18e2f8bd46682befe3227b44167c8e974c7 Mon Sep 17 00:00:00 2001 From: Felix Weinberger Date: Tue, 5 Aug 2025 11:50:06 +0100 Subject: [PATCH] fix: use spread operator to avoid empty string arguments This fixes the regression introduced in dc5fa6a where empty strings were passed as arguments when no command or args were provided, causing parseArgs to fail with "Unexpected argument ''" error. The spread operator approach is more idiomatic and avoids creating empty strings that need to be filtered out. --- client/bin/start.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/bin/start.js b/client/bin/start.js index 0b5e84e29..e0496cde0 100755 --- a/client/bin/start.js +++ b/client/bin/start.js @@ -91,10 +91,10 @@ async function startProdServer(serverOptions) { "node", [ inspectorServerPath, - command ? `--command=${command}` : "", - mcpServerArgs && mcpServerArgs.length > 0 - ? `--args=${mcpServerArgs.join(" ")}` - : "", + ...(command ? [`--command=${command}`] : []), + ...(mcpServerArgs && mcpServerArgs.length > 0 + ? [`--args=${mcpServerArgs.join(" ")}`] + : []), ], { env: {