You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PSNotApplyErrorActionToStderr does not work as expected with ForEach-Object -Parallel #14602
Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtime
It works well without $ErrorActionPreference = 'Stop'.
Actually it doesn't. Stop only causes execution to continue, but it still creates error records (note the red output). If you remove -Parallel, no error records are created, as expected.
This is a known issue. Current session state is not propagated to parallel running sessions. This is currently by design, but there is a work item to address this to some degree.
Paul Higinbotham (@PaulHigin) How are experimental features flags related to a session? They are defined in powershell.config.json. Shouldn't every session load it independently?
Sorry, I misread the issue. I thought this was about propagating the $ErrorActionPreference built-in variable, and it looks like that is being done. I am not sure about experimental features, but it is likely a similar problem in that it needs to be set in the parallel running sessions.
Eli Arbel (@aelij) Please add a comment to issue #12240, so that experimental feature enabling is also considered. Then we can close this issue.
It is the same in how the sessions are set up before running in parallel. There is no point in having multiple issues. I'll add a note to that relevant issue and close this one.
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.
Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtime
Activity
iSazonov commentedon Jan 12, 2021
It works well without
$ErrorActionPreference = 'Stop'./cc Paul Higinbotham (@PaulHigin)
aelij commentedon Jan 12, 2021
Actually it doesn't.
Stoponly causes execution to continue, but it still creates error records (note the red output). If you remove-Parallel, no error records are created, as expected.PaulHigin commentedon Jan 12, 2021
This is a known issue. Current session state is not propagated to parallel running sessions. This is currently by design, but there is a work item to address this to some degree.
#12240
aelij commentedon Jan 12, 2021
Paul Higinbotham (@PaulHigin) How are experimental features flags related to a session? They are defined in
powershell.config.json. Shouldn't every session load it independently?PaulHigin commentedon Jan 12, 2021
Sorry, I misread the issue. I thought this was about propagating the $ErrorActionPreference built-in variable, and it looks like that is being done. I am not sure about experimental features, but it is likely a similar problem in that it needs to be set in the parallel running sessions.
Eli Arbel (@aelij) Please add a comment to issue #12240, so that experimental feature enabling is also considered. Then we can close this issue.
aelij commentedon Jan 12, 2021
I think this should be a different issue.
This is about reading the correct config inside
Parallel, not shared variables/session. It's likely the fix will be different too.PaulHigin commentedon Jan 12, 2021
It is the same in how the sessions are set up before running in parallel. There is no point in having multiple issues. I'll add a note to that relevant issue and close this one.
1 remaining item
aelij commentedon Nov 21, 2023
Bump - still relevant
aelij commentedon Dec 6, 2023
@RandyInMarin
Are you referring to the experimental flags JSON? That's not relevant anymore.
This issue is about how
-Parallelhandlesstderroutput differently. Just run the sample in the post.microsoft-github-policy-service commentedon Jun 3, 2024
This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.
Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.