8000 Get-FormatData doesn't report formatting data for some types for which formatting data ships with PowerShell. · Issue #4237 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Get-FormatData doesn't report formatting data for some types for which formatting data ships with PowerShell. #4237

@mklement0

Description

@mklement0

I haven't looked into the logic behind which types' formatting data isn't being reported, but two examples are below.

A counter example is Get-FormatData System.Management.Automation.AliasInfo, which works as expected.

Steps to reproduce

Get-FormatData System.IO.DirectoryInfo, System.IO.FileInfo

Expected behavior

[System.Management.Automation.ExtendedTypeDefinition] instances describing the formatting, as usual.

Actual behavior

No output is produced; $? indicates $True.

Yet, formatting data is clearly in effect.

In Windows PowerShell, it can be discovered as follows:

Select-String -List System.IO.DirectoryInfo, System.IO.FileInfo $PSHOME/*.ps1xml 

Environment data

PowerShell Core v6.0.0-beta.3 on macOS 10.12.5
PowerShell Core v6.0.0-beta.3 on Ubuntu 16.04.1 LTS
PowerShell Core v6.0.0-beta.3 on Microsoft Windows 10 Pro (64-bit; v10.0.14393)
Windows PowerShell v5.1.15063.413 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0