Commit 923561e
Fix output mode will always be PlainText.
Maybe something larger is out of order, but at the very least even `RenderingPlayground` will stick to `PlainText` unless configured with `[output:ansi]`.
With this change, `OutputMode` will remain `Auto` until the first time something is rendered, [here](https://github.com/dotnet/command-line-api/blob/469b7423fa709682c6988513270f14328b9771f9/src/System.CommandLine.Rendering/ConsoleRenderer.cs#L81) at which time the detection will properly determine `Ansi` is OK.
Without this, [UseAnsiTerminalWhenAvailable](https://github.com/dotnet/command-line-api/blob/469b7423fa709682c6988513270f14328b9771f9/src/System.CommandLine.Rendering/CommandLineBuilderExtensions.cs#L13) will have `context.Console` be a `SystemConsole` which is not an `ITerminal` hence will yield `PlainText` from [`DetectOutputMode`](https://github.com/dotnet/command-line-api/blob/469b7423fa709682c6988513270f14328b9771f9/src/System.CommandLine.Rendering/ConsoleExtensions.cs#L33).1 parent 33ece9e commit 923561e
File tree
1 file changed
+1
-1
lines changed- src/System.CommandLine.Rendering
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
0 commit comments