-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Powershell 7 Preview 5 | Select-String -Pattern crashes when executed in ForEach-Object -Parallel #11052
Copy link
Copy link
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module
Description
Steps to reproduce
0..0 | ForEach-Object -Parallel {
$regExpRule = "this (.+) test"
"it looks like this is a test!" | Select-String -Pattern $regExpRule
}Expected behavior
Should print out
it looks like this is a test!
Actual behavior
The executed code crashes with the following error
Select-String:
Line |
3 | "it looks like this is a test!" | Select-String -Pattern $regExpRule
| ^ Object reference not set to an instance of an object.
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.5
PSEdition Core
GitCommitId 7.0.0-preview.5
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module