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.
This commit is contained in:
parent
cf44b30bcc
commit
de16a18e2f
1 changed files with 4 additions and 4 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue