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
$Error # no output expected
Get-Process blah
$Error # previous and only one error in output
Get-Error # gets the previous error in detailed error output
$Error # only one error in output expected
Actual behavior
$Error # no output expected
Get-Process blah
$Error # previous and only one error in output
Get-Error # gets the previous error in detailed error output
$Error # actual error and Get-Error output both captured in this variable
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.6
PSEdition Core
GitCommitId 7.0.0-preview.6
OS Microsoft Windows 10.0.19033
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Looks like Steve Lee (@SteveL-MSFT)'s fix is still causing the error to be caught and stored in $error when Get-Error duplicates it to avoid modifying the original error object, which seems undesirable.
Activity
iSazonov commentedon Dec 1, 2019
It was fixed in #11125.
I don't know why it is not in Preview6 /cc Steve Lee (@SteveL-MSFT)
kvprasoon commentedon Dec 2, 2019
Ilya (@iSazonov) did you try this ? I got it in P.6
vexx32 commentedon Dec 2, 2019
Looks like Steve Lee (@SteveL-MSFT)'s fix is still causing the error to be caught and stored in
$errorwhenGet-Errorduplicates it to avoid modifying the original error object, which seems undesirable.iSazonov commentedon Dec 2, 2019
PRASOON KARUNAN V (@kvprasoon) I can not repo with latest (post Preview6) build.
vexx32 commentedon Dec 2, 2019
Ah, that'll be why I'm not seeing it, then. Missed that detail, cheers!
iSazonov commentedon Dec 2, 2019
I seems we are not accurate in setting milestones :-(