-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
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!
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime