Closed anton-matosov closed 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/activations/activateTerminal.ts | 0 | 5 | 0.0% | ||
<!-- | Total: | 4 | 9 | 44.44% | --> |
Totals | |
---|---|
Change from base Build 9595185128: | 0.5% |
Covered Lines: | 397 |
Relevant Lines: | 620 |
new EnvironmentVariableCollection API introduced in https://github.com/microsoft/vscode/issues/179476 allows to (re)apply environment variables at the shell integration stage. This is crucial for macOS which uses login shell as default and overrides or prepends set PATH on startup, leading to micromamba paths being absent or push towards the end. This results in system binaries being used as default, essentially deactivating the conda environment
Update
@types/vscode
and@vscode/test-electron
to the latest versions to allow use of the new APIPass in EnvironmentVariableMutatorOptions{ applyAtProcessCreation: true, applyAtShellIntegration: true } to guarantee PATH and other environment variables reapplication after default shell initializtion is complete
Add filtering of the standard shell and vscode environment variables in
parseMicromambaShellActivateResponse
in order to avoid attempting to change read-only variables like PWD and SHLVL as well as causing potential side effects with process specific variables like VSCODE_ (see in code comments for more details)