Write-Host
-ForegroundColor
/ -BackgroundColor
don't respect in-session $PSStyle.OutputRendering = 'PlainText'
, respect it via NO_COLOR
only on Unix
#21168
Labels
In-PR
Indicates that a PR is out for the issue
Needs-Triage
The issue is new and needs to be triaged by a work group.
Prerequisites
Steps to reproduce
Note:
I don't know whether the intent is for
Write-Host -Fore/BackgroundColor
to respect$PSStyle.OutputRendering = 'PlainText'
or not - arguably, it should.'Host'
can be used to use color only when printing to the terminal, and'ANSI'
to request unconditional coloring.De facto, it currently isn't respected - consistently - on Windows and is situationally respected on Unix-like platforms
Expected behavior
Either both 'hi' instances should be blue (as currently on Windows), or, preferably, both should use the default foreground color.
Actual behavior
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: