- VSCode Version: 1.25.1
- OS Version: Ubuntu 16.04.5 x86_64 (This is Linux and macOS only)
Steps to Reproduce:
- Open VS Code from the GUI (.desktop shortcut) (
VSCODE_CLI will be unset)
- Open a separate terminal window and change your
PATH, for example: Enter a virtualenv.
- Launch VS Code from that terminal:
code ..
- Open the developer tools and check
process.env. Your PATH will be reset to your shell's default.
The cause is that this code: https://github.com/Microsoft/vscode/blob/d983257e6f8db693962d0dba9a025678f50778fe/src/vs/code/node/shellEnv.ts#L83-L92
Is executed in the VS Code main process that gets it's environment variables from the first launch of VS Code instead of checking if the new environment that was received for this launch request is from the GUI or CLI.
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
VSCODE_CLIwill be unset)PATH, for example: Enter avirtualenv.code ..process.env. YourPATHwill be reset to your shell's default.The cause is that this code: https://github.com/Microsoft/vscode/blob/d983257e6f8db693962d0dba9a025678f50778fe/src/vs/code/node/shellEnv.ts#L83-L92
Is executed in the VS Code main process that gets it's environment variables from the first launch of VS Code instead of checking if the new environment that was received for this launch request is from the GUI or CLI.
Does this issue occur when all extensions are disabled?: Yes