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
{{ message }}
Repository navigation
Possible updates for the new ternary operator added in PowerShell language #184
The ternary operator will soon be added to the PowerShell language, which may cause syntax colorization issue.
Open this issue to track the possible changes needed in this repo.
Sorry my bad. I just realized that the default PS is set to 5.1 at VS Code. I have installed 7.1 to my machine and after switching Powershell to 7.1 it works. Is there a place to set the default PS to 7.1 in VS Code?
Activity
Satak commentedon Nov 23, 2020
Still problem with the
?ternary operatorFix coming soon?
TylerLeonhardt commentedon Nov 23, 2020
Do you have the ternary operator on the same line as the expression?
Vs
It has to be on the same line.
Satak commentedon Nov 23, 2020
it's like this
$true ? "f" : "s"Satak commentedon Nov 23, 2020
daxian-dbw commentedon Nov 23, 2020
Sami Koskivaara (@Satak) What version of PowerShell are you using?
Satak commentedon Nov 23, 2020
Sorry my bad. I just realized that the default PS is set to 5.1 at VS Code. I have installed 7.1 to my machine and after switching Powershell to 7.1 it works. Is there a place to set the default PS to 7.1 in VS Code?
TylerLeonhardt commentedon Nov 24, 2020
Do you see the version number at the bottom right when you have a PowerShell file open?

If you click on that, you can set which version you want to use. That will set the default.