From 4f68f5fad4bdc934815b1a402b17b2fff4c9aef4 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 2 Sep 2024 17:36:50 -0300 Subject: [PATCH] Revert style for no_color to last working version --- src/dotnet-trx/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dotnet-trx/Program.cs b/src/dotnet-trx/Program.cs index 3a0a2c8..d4b8760 100644 --- a/src/dotnet-trx/Program.cs +++ b/src/dotnet-trx/Program.cs @@ -26,8 +26,9 @@ // Causes -v|--version to be added to help config.SetApplicationVersion(ThisAssembly.Project.Version); - if (Environment.GetEnvironmentVariables().Contains("NO_COLOR")) - config.Settings.HelpProviderStyles = null; + if (Environment.GetEnvironmentVariables().Contains("NO_COLOR") && + config.Settings.HelpProviderStyles?.Options is { } options) + options.DefaultValue = Style.Plain; }); if (args.Contains("--version"))