A followup to #171066 fixing zsh and fish shells implementations#223421
A followup to #171066 fixing zsh and fish shells implementations#223421Tyriar merged 3 commits intomicrosoft:mainfrom
Conversation
…ions microsoft#171066 introduced a fix for applying PATH prefix on macOS login shells that resolved microsoft#99878. However it had little issues for each shell implementation. This PR contains the following fixes: `bash` fix: - Add missing `:` separator in the path setter to avoid path corruption - Add missing quotes to avoid path interpretation `zsh` fix: - Add missing `:` separator in the path setter to avoid path corruption - Add missing quotes to avoid path interpretation - Move patching outside of `.zprofile` check as clean macOS install doesn't include this file, nevertheless PATH patching should still happen `fish` fix: - use `set -gx PATH` instead of `fish_add_path` as the latter has no effect on updating the path if entries already exist in it. Which is the case for some extensions, like [`vscode-micromamba`](https://github.com/mamba-org/vscode-micromamba) which modify process environment and after login shell rc processing path entries end up in the end.
|
I just found that there a second implementation of variables application #179476 that uses Considering that #179476 provides a complete implementation that works for all mutation types and for all shells, including login shell on mac. Shall the workaround for PATH (via VSCODE_PATH_PREFIX) be removed? -- |
as generic env append/prepend can't handle path separators, neither should it be handled here
|
FYI @meganrogge in case you notice anything going wrong with zsh which has the biggest change. |
#171066 introduced a fix for applying PATH prefix on macOS login shells that resolved #99878. However it had little issues for each shell implementation.
This PR contains the following fixes:
bashfix:zshfix:.zprofilecheck as clean macOS install doesn't include this file, nevertheless PATH patching should still happenfishfix:set -gx PATHinstead offish_add_pathas the latter has no effect on updating the path if entries already exist in it. Which is the case for some extensions, likevscode-micromambawhich modify process environment and after login shell rc processing path entries end up in the end.