-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse Error in PS5 #135
Comments
I think I got the same error, it starts failing on line 505 in ModuleBuilder which is the line 42 in the above snippet from InitializeBuild.ps1. It happens in integration tests in Sampler module pipeline that is using PS5.1, integration tests for PS7.x works.
|
I just installed the module in 5.1 and encounter the same error for psm1:505 as well. @{
Key1 = "Somevalue"
Key2 = if ($R = 2/2) {
[Boolean]$R
}
Key3 = "SomeOtherValue"
} When executing it in Windows Powershell 5.1 it errors that the hashliteral is incomplete. @{
Key1 = "Somevalue"
Key2 = $(if ($R = 2/2) {
[Boolean]$R
})
Key3 = "SomeOtherValue"
} Oh, now I see that #136 fixes this by changing the order of the definition. That works too it seems. |
Module does not load in PowerShell 5.1, it seems to be unhappy with the below.
ModuleBuilder/Source/Private/InitializeBuild.ps1
Lines 40 to 42 in e39342d
Run
Import-Module
in PS5 to reproduce. PS7 is fine.The text was updated successfully, but these errors were encountered: