From ad62ba851f8c5cf0e57ec6c91cd2f2fa77907f6b Mon Sep 17 00:00:00 2001 From: dcdenu4 Date: Mon, 4 Nov 2024 12:56:41 -0500 Subject: [PATCH] I. #1675 wrap mamba cmd in quotes --- workbench/src/main/setupAddRemovePlugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workbench/src/main/setupAddRemovePlugin.js b/workbench/src/main/setupAddRemovePlugin.js index 1818eb9355..a490132e13 100644 --- a/workbench/src/main/setupAddRemovePlugin.js +++ b/workbench/src/main/setupAddRemovePlugin.js @@ -40,15 +40,15 @@ export function setupAddPlugin() { // Create a conda env containing the plugin and its dependencies const envName = `invest_plugin_${pluginID}`; const mamba = settingsStore.get('mamba'); - execSync(`${mamba} create --yes --name ${envName} -c conda-forge "python<3.12" "gdal<3.6"`, + execSync(`"${mamba}" create --yes --name ${envName} -c conda-forge "python<3.12" "gdal<3.6"`, { stdio: 'inherit', windowsHide: true }); logger.info('created mamba env for plugin'); - execSync(`${mamba} run --name ${envName} pip install "git+${pluginURL}"`, + execSync(`"${mamba}" run --name ${envName} pip install "git+${pluginURL}"`, { stdio: 'inherit', windowsHide: true }); logger.info('installed plugin into its env'); // Write plugin metadata to the workbench's config.json - const envInfo = execSync(`${mamba} info --envs`, { windowsHide: true }).toString(); + const envInfo = execSync(`"${mamba}" info --envs`, { windowsHide: true }).toString(); logger.info(`env info:\n${envInfo}`); const envPath = envInfo.match(`${envName}\\s+(.+)$`)[1]; logger.info(`env path:\n${envPath}`); @@ -81,7 +81,7 @@ export function setupRemovePlugin() { const env = settingsStore.get(`plugins.${pluginID}.env`); const mamba = settingsStore.get('mamba'); execSync( - `${mamba} remove --yes --prefix ${env} --all`, + `"${mamba}" remove --yes --prefix ${env} --all`, { stdio: 'inherit' } ); // Delete the plugin's data from storage