Cannot pass environment variable that is already defined in shell's rc file. #4779
Labels
bug
Issue identified by VS Code Team member as probable bug
*duplicate
Issue identified as a duplicate of another issue(s)
Milestone
Steps to Reproduce:
Export a variable in your default shell (
~/.zlogin
for zsh;~/.bash_login
for bash, for example. You can use.bashrc
as well).Pass different value of the same variable to VSCode.
FOOBAR=2 code .
VSCode uses value defined for login shell, not current session:
Help > Toggle Developer Tools. And in Console,
process.env.FOOBAR
gives "1" when I expect "2".It looks like VSCode executes default shell as login shell again before launching the program UI.
Being able to pass different values for existing environment variables greatly helps writing/testing extensions.
Related discussion: microsoft/vscode-go#220 (comment)
strace example:
The text was updated successfully, but these errors were encountered: