mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
When executing a single command block, two bugs existed. 1) Exceptions were not reported, instead it core dumped 2) The error code was not set, instead 0 was returned Fixing 1) required calling `Execute` instead of `ExecuteHelper` as the latter handles exception through `ReportException`. Fixing 2) required setting the listener's error code when an exception was thrown, and resetting it for each command when an interactive session is running.