Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Feb 5, 2020

PR Summary

ConciseView relied on the window width for calculating line wrapping. In the case where PowerShell is run on a system without a console, the call to get the console windowwidth throws. Fix is to wrap the use of [Console]::WindowWidth in a try..catch and use a default value for the width if it throws.

PR Context

Fix #11776

PR Checklist

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 6, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.1 milestone Feb 6, 2020
@SteveL-MSFT
Copy link
Member Author

@iSazonov can you merge this so I can make a fix for the other issue with these changes to avoid a merge conflict?

@iSazonov iSazonov merged commit 5edafb6 into PowerShell:master Feb 12, 2020
@SteveL-MSFT SteveL-MSFT deleted the concise-width branch February 12, 2020 14:48
@ghost
Copy link

ghost commented Mar 26, 2020

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in Formatting while being without console

3 participants