-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
Format-Table returns null when run on vsts. The possible reason is that it tries to adjust table to the console dimensions and some parameters of the console like e.g. width might not be set on vsts. In this case the width of the Format-Table results should be set to some default value e.g. 80.
The workaround for that is using Out-String -Width e.g.:
$result = Format-Table -inputobject @{'test'= 1, 2} | Out-String -Width 80
But the expected behavior is that Format-Table returns non null results regardless of the environment.
Steps to reproduce
$result = Format-Table -inputobject @{'test'= 1, 2}
Expected behavior
Name Value
---- -----
test {1, 2}
Actual behavior
$result is null
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.1
PSEdition Core
GitCommitId v6.1.0-preview.1
OS Linux 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018
Platform Unix
PSCompatibleVersions {...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Metadata
Metadata
Assignees
Labels
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module