Merge pull request #1974 from emlys/bugfix/1965
call the right micromamba executable in plugin install commands
This commit is contained in:
commit
f8d3b97d39
12
HISTORY.rst
12
HISTORY.rst
|
@ -60,10 +60,16 @@
|
|||
6. InVEST model Z (model names should be sorted A-Z)
|
||||
|
||||
|
||||
Unreleased Changes
|
||||
------------------
|
||||
|
||||
General
|
||||
=======
|
||||
* Fixed a micromamba command bug in 3.16.0a1 that was calling micromamba
|
||||
directly, instead of using the path to the executable
|
||||
(`#1965 <https://github.com/natcap/invest/issues/1965>`_). This was
|
||||
mistakenly not actually released in 3.16.0a2.
|
||||
|
||||
..
|
||||
Unreleased Changes
|
||||
------------------
|
||||
|
||||
3.16.0a2 (2025-05-28)
|
||||
---------------------
|
||||
|
|
|
@ -147,15 +147,14 @@ export function setupAddPlugin(i18n) {
|
|||
'python', '-m', 'pip', 'install', installString]
|
||||
);
|
||||
logger.info('installed plugin into its env');
|
||||
|
||||
event.sender.send('plugin-install-status', i18n.t('Importing plugin...'));
|
||||
// Access plugin metadata from the MODEL_SPEC
|
||||
const modelID = execSync(
|
||||
`micromamba run --prefix "${pluginEnvPrefix}" ` +
|
||||
`${micromamba} run --prefix "${pluginEnvPrefix}" ` +
|
||||
`python -c "import ${packageName}; print(${packageName}.MODEL_SPEC.model_id)"`
|
||||
).toString().trim();
|
||||
const modelTitle= execSync(
|
||||
`micromamba run --prefix "${pluginEnvPrefix}" ` +
|
||||
`${micromamba} run --prefix "${pluginEnvPrefix}" ` +
|
||||
`python -c "import ${packageName}; print(${packageName}.MODEL_SPEC.model_title)"`
|
||||
).toString().trim();
|
||||
|
||||
|
@ -178,7 +177,7 @@ export function setupAddPlugin(i18n) {
|
|||
);
|
||||
logger.info('successfully added plugin');
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
logger.info(error);
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue