Get-FormatData
should output non-terminating errors
#21139
Labels
In-PR
Indicates that a PR is out for the issue
Needs-Triage
The issue is new and needs to be triaged by a work group.
Prerequisites
Steps to reproduce
Get-FormatData # Works fine for now
this will demonstrate the bug, but so will any module that has a element in a format file.
Install-Module Posh -Scope CurrentUser
Import-Module Posh
Get-FormatData # Now just blows up unhelpfully
Expected behavior
Get-FormatData writes a non-terminating error for each formatter with errors.
Actual behavior
Get-FormatData: Unable to cast object of type 'Microsoft.PowerShell.Commands.Internal.Format.ControlReference' to type 'Microsoft.PowerShell.Commands.Internal.Format.ComplexControlBody'.
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: