Skip to content

Commit

Permalink
Ensure we don't render style for default option value
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jul 17, 2024
1 parent 21ec806 commit d4d52ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/dotnet-trx/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
if (args.Contains("--debug"))
Debugger.Launch();

app.Configure(config => config.SetApplicationName(ThisAssembly.Project.ToolCommandName));
app.Configure(config =>
{
config.SetApplicationName(ThisAssembly.Project.ToolCommandName);
if (Environment.GetEnvironmentVariables().Contains("NO_COLOR") &&
config.Settings.HelpProviderStyles?.Options is { } options)
options.DefaultValue = Style.Plain;
});

if (args.Contains("--version"))
{
Expand Down
8 changes: 4 additions & 4 deletions src/dotnet-trx/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ OPTIONS:
-p, --path Optional base directory for *.trx files
discovery. Defaults to current directory
-o, --output Include test output
-r, --recursive [1mTrue[0m Recursively search for *.trx files
--skipped [1mTrue[0m Include skipped tests
-r, --recursive True Recursively search for *.trx files
--skipped True Include skipped tests
--no-exit-code Do not return a -1 exit code on test
failures
--version Show version information
--gh-comment [1mTrue[0m Report as GitHub PR comment
--gh-summary [1mTrue[0m Report as GitHub step summary
--gh-comment True Report as GitHub PR comment
--gh-summary True Report as GitHub step summary
```

0 comments on commit d4d52ba

Please sign in to comment.