You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension version (available under the Extensions sidebar): 2018.3.1
OS and version: Windows 10
Python version (& distribution if applicable, e.g. Anaconda): Anaconda 5.1.0
Actual behavior
For activation of an environment with whitespaces in the path the extension executes a line of the form & cmd /k ""C:/Program Files (x86)/.../activate.bat" & powershell"
in the PowerShell terminal. The dots are placeholders. This way the first two quotes are treated as an empty string and the command can not be parsed by cmd.exe.
Expected behavior
The nested quotes need to be properly escaped. For example by doubling the inner quotes: & cmd /k """C:/Program Files (x86)/.../activate.bat"" & powershell"
or by making the outer quotes single quotes: & cmd /k '"C:/Program Files (x86)/.../activate.bat" & powershell'
both of which would be proper ways to deal with nested quotes in PowerShell and lead to the desired execution of activation.bat.
Steps to reproduce:
Install an Anaconda distribution under a path that contains directories with whitespaces in their names
Select this distribution as Python interpreter in VS Code with Python Extension and default settings
Activity
DonJayamanne commentedon Apr 30, 2018
Closing as a duplicate of #1534