Skip to content

Fix Write-Host -NoNewLine and -*Color #1668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

SeeminglyScience
Copy link
Collaborator

Fixes #1667, PowerShell/vscode-powershell#3651

When we merge the Information stream into output it causes all information messages to be written directly to the output stream. This ignores InformationAction and also strips Write-Host of it's extra color/new line metadata.

This also fixes PowerShell/vscode-powershell#3705 (I would assume anyway)

SeeminglyScience and others added 2 commits January 18, 2022 11:09
This was causing an error where the formatting of the information
streams was dropped, and so just rendered in plaintext. This code now
operates the same was as in version 2.0, where we only merge the error
stream into the output.
@andyleejordan andyleejordan force-pushed the SeeminglyScience/issue1667 branch from 230efb6 to c237063 Compare January 18, 2022 19:18
@andyleejordan
Copy link
Member

@SeeminglyScience For what it's worth, it looks like @rjmholt added the part to merge the information results in b105808, and I confirmed that before that we only ever merged the error stream (I'm not sure why this was added though, the commit message doesn't say):

> g log -G"PipelineResultTypes.Information"
commit 4997f676f
Author: Justin Grote <JustinGrote@users.noreply.github.com>
Date:   Mon Nov 15 14:05:56 2021

    Fix `ArgumentOutOfRangeException` when `throw` is used
    
    Co-authored-by: Andy Schwartzmeyer <andrew@schwartzmeyer.com>

commit ceb20e8f4
Author: Robert Holt <rjmholt_msft@outlook.com>
Date:   Mon Oct 11 18:30:17 2021

    Remove unneeded internal usings

commit 1caaa3b16
Author: Robert Holt <rjmholt_msft@outlook.com>
Date:   Tue Jul 21 11:47:37 2020

    Fix out-string usage in debugger

commit 1c5897e72
Author: Robert Holt <rjmholt_msft@outlook.com>
Date:   Thu Jul 16 20:31:52 2020

    Add simple debug REPL support

commit b10580803
Author: Robert Holt <rjmholt_msft@outlook.com>
Date:   Thu Jun 25 11:15:47 2020

    Implement cancellation properly, make F8 work

@andyleejordan
Copy link
Member

Perhaps the merge was added because the missing methods in the UI was causing the information not to be emitted at all 🤔

Anyway, this does indeed fix PowerShell/vscode-powershell#3651 Thank you! Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
2 participants