-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Get-Process -Module fails to stop when piped to Select-Object -First #15117
Copy link
Copy link
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
It seems that when
Select-Object -Firsttries to stop upstream pipeline input,Get-Process -Moduledoesn't handle this request properly and emits many spurious error messages.Steps to reproduce
Expected behavior
No errors should occur, and the test should succeed.
Actual behavior
Error message
Get-Process: Cannot enumerate the modules of the "pwsh" process.is (wrongly) emitted (withoutSelect-Object -First, the command succeeds), and the test fails:Environment data