From 2aae9e0a07e2ae26d5330fdd7875c7d33001c889 Mon Sep 17 00:00:00 2001 From: Akos Kitta Date: Sun, 20 Aug 2023 18:03:45 +0200 Subject: [PATCH] fix: execute the Arduino CLI without a `shell` Closes arduino/arduino-ide#2112 Ref: arduino/arduino-ide#2067 Signed-off-by: Akos Kitta --- arduino-ide-extension/src/node/arduino-daemon-impl.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arduino-ide-extension/src/node/arduino-daemon-impl.ts b/arduino-ide-extension/src/node/arduino-daemon-impl.ts index d2fe7d81b..b7af78627 100644 --- a/arduino-ide-extension/src/node/arduino-daemon-impl.ts +++ b/arduino-ide-extension/src/node/arduino-daemon-impl.ts @@ -173,10 +173,9 @@ export class ArduinoDaemonImpl const cliPath = this.getExecPath(); const ready = new Deferred<{ daemon: ChildProcess; port: string }>(); const options = { - shell: true, env: { ...deepClone(process.env), NO_COLOR: String(true) }, }; - const daemon = spawn(`"${cliPath}"`, args, options); + const daemon = spawn(cliPath, args, options); // If the process exists right after the daemon gRPC server has started (due to an invalid port, unknown address, TCP port in use, etc.) // we have no idea about the root cause unless we sniff into the first data package and dispatch the logic on that. Note, we get a exit code 1.