-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
type::bugdescribes erroneous operation, use severity::* to classify the typedescribes erroneous operation, use severity::* to classify the type
Description
Checklist
- I added a descriptive title
- I searched open reports and couldn't find a duplicate
What happened?
The CMD shell activation was modified in conda 25.3.0 to support users using Windows AppLocker with script restrictions enabled.
Xref conda/conda#13610
Xref conda/conda#14607
This change results in conda shell.cmd.exe activate * no longer producing a dynamic .bat script to be executed but rather produces an ini-style .env file to be consumed by the CONDA_ROOT\condabin\_conda_activate.bat.
To support conda 25.3.0+, menuinst's manual calls to conda shell.cmd.exe activate * need updating to properly handle activation, e.g.:
menuinst/menuinst/platforms/win.py
Lines 271 to 283 in 7e1aa1f
| if self.metadata["activate"]: | |
| conda_exe = self.menu.conda_exe | |
| if self.menu._is_micromamba(conda_exe): | |
| activate = "shell activate" | |
| else: | |
| activate = "shell.cmd.exe activate" | |
| activator = f'{self.menu.conda_exe} {activate} "{self.menu.prefix}"' | |
| lines += [ | |
| "@SETLOCAL ENABLEDELAYEDEXPANSION", | |
| f'@FOR /F "usebackq tokens=*" %%i IN (`{activator}`) do set "ACTIVATOR=%%i"', | |
| "@CALL %ACTIVATOR%", | |
| ":: This below is the user command", | |
| ] |
This change is likely the cause of the recent failures:
Conda Info
Conda Config
Conda list
Additional Context
No response
Metadata
Metadata
Assignees
Labels
type::bugdescribes erroneous operation, use severity::* to classify the typedescribes erroneous operation, use severity::* to classify the type