X Tutup
Skip to content

Select-Object default output formatting is situationally broken #10762

@mklement0

Description

@mklement0

The test command below should yield:

Length
------
     3

but currently yields:

@{Length=3}

The problem may be specific to [string] input (a rare scenario) - not sure what the underlying pattern is.

Steps to reproduce

'one' | Select-Object Length | Out-String | Should -not -match '@'

Expected behavior

The test should pass.

Actual behavior

The test fails.

Expected regular expression '@' to not match '@{Length=3}
', but it did match.

Environment data

PowerShell Core 7.0.0-preview.4

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup