Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode does not inherit command prompt environment variables when launched using code.exe #236981

Open
Primer81 opened this issue Dec 26, 2024 · 0 comments
Assignees

Comments

@Primer81
Copy link

Primer81 commented Dec 26, 2024

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.97.0 insiders
  • OS Version: Windows 10 (build 19045)

Steps to Reproduce:

  1. Open command prompt and launch vscode with the following commands:
set PATH=C:\msys64\mingw64\bin
start /d "C:\path\to\vscode\install\directory\" Code.exe -n
  1. In the VSCode instance, open a Command Prompt terminal and execute echo %PATH%
  2. Open a new command prompt window and launch vscode with the following commands:
set PATH=C:\msys64\ucrt64\bin
start /d "C:\path\to\vscode\install\directory\" Code.exe -n
  1. In the new VSCode instance, open a Command Prompt terminal and execute echo %PATH%

Expected behavior: The second instance of VSCode will echo C:\msys64\ucrt64\bin.
Actual behavior: The second instance of VSCode echos C:\msys64\mingw64\bin.

Related to the following closed issues: #15452 #109238. After reviewing these issues, I do believe this is a bug and not the intended design. I wasn't able to find any open issues regarding this topic.

I also read the loosely related open feature-request #47816, but it doesn't capture this issue specifically since it is talking about updating the environment for new terminal instances within an already open instance of VSCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants