-
Notifications
You must be signed in to change notification settings - Fork 510
Write-Host -NoNewLine
not respected
#3651
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
Comments
Well now this one is weird! |
I see this with Pester too. Formatting using NoNewLine, ForegroundColor and BackgroundColor with ANSI and |
Does the new PSES backend rely on stream-redirection? I just remembered this issue in Pester about formatting being lost when information stream (which |
I think the color problem is likely due to PowerShell/PowerShellEditorServices#1607 |
EditorServicesConsolePSHostUserInterface needs to implement the virtual (and otherwise empty) method |
Yeah that's sounds more like what I'd expect as it would also affect the NoNewLine-part. 👍 Not really related to this issue but should it also implement |
|
I meant implemented in EditorServicesConsolePSHostUserInterface. 🙂 |
Oops! 😁 Yeah that'd be good to add as well, thanks for catching that. I don't think it'll cause any bugs since the method does have a default implementation but |
Interesting...I wonder why we didn't manage to get this as fleshed out. |
Incredibly easy to miss tbh. They don't get generated from the code action to implement an abstract type. You need the one that says "Generate all overrides" or something like that. Though even with that you need to be careful not to override a method with a default implementation you need to keep. Kind of a rough extension model to have empty virtual methods rather than abstract, but it's what you gotta to to not introduce breaking changes. |
Ohh, I see! Thanks Patrick. |
Unfortunately @SeeminglyScience there seems to be a bit more to it than just overriding those abstract methods. I'll open a draft PR, but in my testing it's not seeming to fix it. There's also a |
Fix for this has been merged! |
Write-Host -NoNewLine
not respected
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
Prerequisites
Summary
I have written PowerShell module PSWriteColor which uses Write-Host -NoNewLine pretty much all the time
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Type in powershell editor, press F5
Visuals
No response
Logs
No response
The text was updated successfully, but these errors were encountered: