Skip to content

Commit

Permalink
dotnet-counters: Disable ANSI support on Windows as VTerm doesn't alw…
Browse files Browse the repository at this point in the history
…ays respect it and it breaks rendering (#2971)
mikelle-rogers authored Apr 4, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2aa2e93 commit e0c184f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Tools/dotnet-counters/CounterMonitor.cs
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace Microsoft.Diagnostics.Tools.Counters
{
@@ -475,7 +476,7 @@ public async Task<int> Monitor(
using (DiagnosticsClientHolder holder = await builder.Build(ct, _processId, diagnosticPort, showChildIO: false, printLaunchCommand: false))
using (VirtualTerminalMode vTerm = VirtualTerminalMode.TryEnable())
{
bool useAnsi = vTerm.IsEnabled;
bool useAnsi = vTerm.IsEnabled && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if (holder == null)
{
return ReturnCode.Ok;

0 comments on commit e0c184f

Please sign in to comment.