Hello,
running pwsh 7.0.0-rc2 on my build server the following happens when my own cmdlet raises an exception:
`
| 05-Feb-2020 10:35:56 |
|
| 05-Feb-2020 10:35:56 |
OperationStopped: |
| 05-Feb-2020 10:35:56 |
Line | |
| 05-Feb-2020 10:35:56 |
161 | … if ([Console]::WindowWidth -gt 0 -and ($message.Length - $pre … |
| 05-Feb-2020 10:35:56 |
|
| 05-Feb-2020 10:35:56 |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 05-Feb-2020 10:35:56 |
| Das Handle ist ungültig. |
| ` |
|
You are trying to read WindowWidth but there is no window. So you get Invalid Handle for the non existing console window.
Happens here on line 1154: https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
Please fix.
Thanks!
Hello,
running pwsh 7.0.0-rc2 on my build server the following happens when my own cmdlet raises an exception:
`
You are trying to read WindowWidth but there is no window. So you get Invalid Handle for the non existing console window.
Happens here on line 1154: https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
Please fix.
Thanks!