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
I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
Summary
Here is the output in the TERMINAL window when VSCode PowerShell extension starts. The profile scripts are shown below. When the CurrentUserAllHosts script is run, $PROFILE is NULL. None of these scripts set the value of $PROFILE.
There are two (2) problems.
When one of the non-user profile scripts is invoked (probably AllUsersAllHosts), it appears that the path to the script does not use appropriately placed QUOTATION MARK characters.
When the CurrentUserAllHosts script is run, $PROFILE is NULL.
=====> PowerShell Preview Integrated Console v2021.10.3 <=====
C:\Program: The term 'C:\Program' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Running profile C:\Users\lit\Documents\PowerShell\profile.ps1
PROFILE is NULL
PS C:\Users\lit>
When the TERMINAL command prompt becomes available, the PROFILE variable now contains the following.
I can confirm similar behaviour here - it will not load profiles with spaces in the path when using PowerShell Preview extension. I moved back to PowerShell stable extension and the issue goes away.
Rob, thanks for confirming. I have forgotten why, but there was something that the stable version did not do that caused me to use the preview version. Going back to stable may not be a workaround.
I can confirm similar behaviour here - it will not load profiles with spaces in the path when using PowerShell Preview extension. I moved back to PowerShell stable extension and the issue goes away.
Prerequisites
Summary
Here is the output in the TERMINAL window when VSCode PowerShell extension starts. The profile scripts are shown below. When the CurrentUserAllHosts script is run, $PROFILE is NULL. None of these scripts set the value of $PROFILE.
There are two (2) problems.
When one of the non-user profile scripts is invoked (probably AllUsersAllHosts), it appears that the path to the script does not use appropriately placed QUOTATION MARK characters.
When the CurrentUserAllHosts script is run, $PROFILE is NULL.
When the TERMINAL command prompt becomes available, the PROFILE variable now contains the following.
These are the profile scripts. Note that both of the Microsoft.VSCode_profile.ps1 files do not exist.
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Start VSCode powershell extension with profile scripts included above.
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: