8000 Fix issue with Get-Process -Module failing to stop when piped to Select-Object by ArmaanMcleod · Pull Request #15682 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Fix issue with Get-Process -Module failing to stop when piped to Select-Object #15682

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

Merged
merged 1 commit into from
Aug 12, 2021

Conversation

ArmaanMcleod
Copy link
Contributor
@ArmaanMcleod ArmaanMcleod commented Jun 28, 2021

PR Summary

Previously when running Get-Process -Module and piping to Select-Object, you would receive this error:

getmodule-error

Where the command succeeds, but the upstream output is not halted and the Get-Process: Cannot enumerate the modules of the "pwsh" process. non-terminating error is included.

To fix this, I added another clause to catch PipelineStoppedException from WriteObject, and rethrow error, which omits the error message completely.

getmodule-error-fix

Also added a Pester test to verify this.

PR Context

Fix #15117

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jun 29, 2021
@ghost ghost added the Review - Needed The PR is being reviewed label Jul 6, 2021
@ghost
Copy link
ghost commented Jul 6, 2021

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@rjmholt rjmholt assigned rjmholt and unassigned TravisEz13 Aug 12, 2021
8000
@ghost ghost removed the Review - Needed The PR is being reviewed label Aug 12, 2021
@rjmholt rjmholt merged commit b70f06c into PowerShell:master Aug 12, 2021
@rjmholt
Copy link
Collaborator
rjmholt commented Aug 12, 2021

Thanks for your contribution @ArmaanMcleod!

@iSazonov iSazonov added this to the 7.2.0-preview.9 milestone Aug 12, 2021
@ArmaanMcleod ArmaanMcleod deleted the get-process-module-fix branch August 13, 2021 03:21
xtqqczze pushed a commit to xtqqczze/PowerShell-PowerShell that referenced this pull request Aug 20, 2021
@ghost
Copy link
ghost commented Aug 23, 2021

🎉v7.2.0-preview.9 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link
ghost commented Sep 28, 2021

🎉v7.2.0-preview.10 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get-Process -Module fails to stop when piped to Select-Object -First
5 participants
0