Skip to content

Conversation

@thomhurst
Copy link
Owner

Summary

  • Adds TUNIT_DISABLE_LOGO environment variable support to disable the ASCII art logo
  • Updates command-line flags documentation to mention the new environment variable
  • Adds comprehensive environment variables reference documentation

Closes #4574

Changes

  • TUnit.Engine/Capabilities/BannerCapability.cs: Check for TUNIT_DISABLE_LOGO environment variable alongside the --disable-logo command-line flag
  • docs/docs/reference/command-line-flags.md: Note that --disable-logo can also be set via environment variable
  • docs/docs/reference/environment-variables.md: New comprehensive documentation covering all TUnit environment variables
  • docs/sidebars.ts: Add environment variables doc to sidebar

Test plan

  • Verify TUNIT_DISABLE_LOGO=true suppresses the ASCII logo
  • Verify --disable-logo still works as before
  • Verify command-line flag takes precedence over environment variable

🤖 Generated with Claude Code

Add support for configuring --disable-logo via the TUNIT_DISABLE_LOGO
environment variable. This allows CI/CD pipelines and development
environments to set defaults without modifying command-line arguments.

Also adds comprehensive documentation for all TUnit environment variables.

Closes #4574

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@thomhurst
Copy link
Owner Author

Summary

Adds support for the TUNIT_DISABLE_LOGO environment variable to disable the ASCII art logo, alongside comprehensive environment variables documentation.

Critical Issues

None found ✅

Suggestions

1. Environment Variable Value Checking Pattern Inconsistency

The implementation in BannerCapability.cs:26 uses:

Environment.GetEnvironmentVariable("TUNIT_DISABLE_LOGO") is not null

However, this differs from the more robust pattern used in TestScheduler.cs for TUNIT_MAX_PARALLEL_TESTS, which explicitly parses values. For boolean-style flags, the codebase uses a simpler "is not null" check (as seen in GitHubReporter.cs:27-28), which is correct and consistent.

However, consider documenting in environment-variables.md that any non-null value enables the flag (not just "true"). For example, both of these would disable the logo:

export TUNIT_DISABLE_LOGO=true
export TUNIT_DISABLE_LOGO=1
export TUNIT_DISABLE_LOGO=false  # This would ALSO disable the logo!

The documentation currently shows only =true which might mislead users into thinking =false would enable it. Consider clarifying:

# Set to any value to disable the logo (presence of variable disables it)
export TUNIT_DISABLE_LOGO=1

2. Priority Order Clarification

The documentation states command-line arguments take precedence, but the current implementation in BannerCapability.cs:25-26 checks both conditions with `||":

if (commandLineOptions.IsOptionSet(DisableLogoCommandProvider.DisableLogo)
    || Environment.GetEnvironmentVariable("TUNIT_DISABLE_LOGO") is not null

This means if either is set, the logo is disabled - which is the correct behavior. The documentation correctly describes this, so no code change needed.

3. Minor Documentation Consistency

In environment-variables.md, line 21, the documentation shows:

**Equivalent to:** `--disable-logo`

Consider adding similar "Equivalent to:" sections for all other environment variables that have command-line equivalents (like TUNIT_MAX_PARALLEL_TESTS), which you do on line 82. Good consistency there!

Verdict

APPROVE - No critical issues. The implementation follows existing patterns in the codebase. The suggestions are minor documentation clarifications that could be addressed in a follow-up PR.

@thomhurst thomhurst enabled auto-merge (squash) January 27, 2026 12:22
@thomhurst thomhurst merged commit 3810a31 into main Jan 27, 2026
12 of 13 checks passed
@thomhurst thomhurst deleted the feature/env-var-disable-logo branch January 27, 2026 12:58
This was referenced Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Environment variable support for --disable-logo and --no-progress flags

2 participants