From 1fd025802b65e3fe0841cd0375d6f9ee44ae68e4 Mon Sep 17 00:00:00 2001 From: dcdenu4 Date: Fri, 15 Nov 2024 16:34:09 -0500 Subject: [PATCH 1/2] Spawn call was missing shell true option --- workbench/src/main/setupAddRemovePlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbench/src/main/setupAddRemovePlugin.js b/workbench/src/main/setupAddRemovePlugin.js index 34311a74d..2676881df 100644 --- a/workbench/src/main/setupAddRemovePlugin.js +++ b/workbench/src/main/setupAddRemovePlugin.js @@ -27,7 +27,8 @@ const logger = getLogger(__filename.split('/').slice(-1)[0]); */ function spawnWithLogging(cmd, args, options) { logger.info(cmd, args); - const cmdProcess = spawn(cmd, args, { ...options, windowsHide: true }); + const cmdProcess = spawn( + cmd, args, { ...options, shell: true, windowsHide: true }); if (cmdProcess.stdout) { cmdProcess.stderr.on('data', (data) => logger.info(data.toString())); cmdProcess.stdout.on('data', (data) => logger.info(data.toString())); From 276632db06803c29b00d469f65ac2df0b95f99e7 Mon Sep 17 00:00:00 2001 From: dcdenu4 Date: Thu, 21 Nov 2024 09:53:08 -0500 Subject: [PATCH 2/2] add comment for shell set to true. --- workbench/src/main/setupAddRemovePlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workbench/src/main/setupAddRemovePlugin.js b/workbench/src/main/setupAddRemovePlugin.js index 2676881df..09463b3b3 100644 --- a/workbench/src/main/setupAddRemovePlugin.js +++ b/workbench/src/main/setupAddRemovePlugin.js @@ -15,7 +15,8 @@ const logger = getLogger(__filename.split('/').slice(-1)[0]); * Spawn a child process and log its stdout, stderr, and any error in spawning. * * child_process.spawn is called with the provided cmd, args, and options, - * and the windowsHide option set to true. + * and the windowsHide option set to true. The shell option is set to true + * because spawn by default sets shell to false. * * Required properties missing from the store are initialized with defaults. * Invalid properties are reset to defaults.