Description
- VS Code Version: 1.82.2 (user setup)
- OS Version: Windows_NT x64 10.0.19045
Steps to Reproduce:
- open the integreted powershell.
- run any command.
This is a very weird issue that integreted powershell doesn't share the same PATH env variables with the outside powershell 7.
I installed anaconda, mainly for python dev.
Debugging python codes with vscode integreted powershell is successful, but when i wanna use the integreted powershell to do other works(e.g. pip install a whl), it always turns out to be "set-Item: Cannot find drive. A drive with the name '.D' does not exist." error.
Last time i saw this kind of error, i found " '.C' does not exist", and i checked the $env:PATH, find a value is written '.C:/(...)', i used set-Item command removed the value and it started to work properly.
But after a rebooting my computer, it turns out to be the same with "Cannot find drive. A drive with the name '.D' does not exist". however, this time i cannot use set-Item to fix it, the error report is the same 'Cannot find drive'. The $env:PATH has a lot of dumplicates since a .D occurred, and I cannot remove the .D line anymore.
This issue is quite similar to microsoft/vscode#74606, but i don't know if they are really the same.
the outside powershell 7's $env:PATH:
C:\Program Files\PowerShell\7;D:\anaconda3\Scripts;D:\anaconda3\envs\tf-gpu\Library\bin;C:\Windows\system32;D:\Git\cmd;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvp;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.4.0;C:\Program Files\PowerShell\7;C:\Users\liquid\AppData\Local\Microsoft\WindowsApps;D:\Microsoft VS Code\bin
the integreted powershell 7's $env:PATH:
C:\Program Files\PowerShell\7;D:\anaconda3\envs\tf-gpu;D:\anaconda3\envs\tf-gpu\Library\mingw-w64\bin;D:\anaconda3\envs\tf-gpu\Library\usr\bin;D:\anaconda3\envs\tf-gpu\Library\bin;D:\anaconda3\envs\tf-gpu\Scripts;D:\anaconda3\envs\tf-gpu\bin;D:\anaconda3\condabin;C:\Program Files\PowerShell\7;D:\anaconda3\Scripts;D:\anaconda3\envs\tf-gpu\Library\bin;C:\Windows\system32;D:\Git\cmd;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvp;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.4.0;C:\Program Files\PowerShell\7;C:\Users\liquid\AppData\Local\Microsoft\WindowsApps;D:\anaconda3\envs\tf-gpu\Library\bin;D:\anaconda3\Scripts;D:\Microsoft VS Code\bin;.D:\anaconda3\Scripts;D:\anaconda3\envs\tf-gpu\Library\bin;C:\Windows\system32;D:\Git\cmd;C:\Program Files\NVIDIA GPU
Computing Toolkit\CUDA\v12.0\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\libnvvp;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.4.0;C:\Program Files\PowerShell\7;C:\Users\liquid\AppData\Local\Microsoft\WindowsApps;D:\anaconda3\envs\tf-gpu\Library\bin;D:\anaconda3\Scripts;D:\Microsoft VS Code\bin;
the '.D' is with '.D:\anaconda3\Scripts'