-
Notifications
You must be signed in to change notification settings - Fork 519
Open
Labels
Issue-BugA bug to squash.A bug to squash.Needs: TriageMaintainer attention needed!Maintainer attention needed!
Description
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- 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.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
When running the following simple script:
`$ben = $true
if ($ben) {
Write-Output "ben"
}
`
the extension throws this error:
Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndCurlyBrace
if the script looks like this:
`$ben = $true
if ($ben)
{
Write-Output "ben"
}`
or this:
`$ben = $true
if ($ben) { Write-Output "ben" }
`
it works.
Or if I switch to version 7 of powershell.
PowerShell Version
Name Value
---- -----
PSVersion 5.1.26100.6584
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.6584
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visual Studio Code Version
1.105.1
x64
Extension Version
Steps to Reproduce
see description
Visuals
No response
Logs
No logs

Log level set to trace:

found these
ms-vscode.powershell.zip
Metadata
Metadata
Assignees
Labels
Issue-BugA bug to squash.A bug to squash.Needs: TriageMaintainer attention needed!Maintainer attention needed!