File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/System.Management.Automation/engine/hostifaces Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,14 @@ public override
209209 return ;
210210 }
211211
212- _externalUI . Write ( foregroundColor , backgroundColor , value ) ;
212+ if ( PSStyle . Instance . OutputRendering == OutputRendering . PlainText )
213+ {
214+ _externalUI . Write ( value ) ;
215+ }
216+ else
217+ {
218+ _externalUI . Write ( foregroundColor , backgroundColor , value ) ;
219+ }
213220 }
214221
215222 /// <summary>
@@ -303,7 +310,14 @@ public override
303310 return ;
304311 }
305312
306- _externalUI . WriteLine ( foregroundColor , backgroundColor , value ) ;
313+ if ( PSStyle . Instance . OutputRendering == OutputRendering . PlainText )
314+ {
315+ _externalUI . WriteLine ( value ) ;
316+ }
317+ else
318+ {
319+ _externalUI . WriteLine ( foregroundColor , backgroundColor , value ) ;
320+ }
307321 }
308322
309323 /// <summary>
You can’t perform that action at this time.
0 commit comments