Skip to content

Force truecolor support to avoid automatic color detection. (3.x)#1633

Merged
kmvanbrunt merged 1 commit into3.xfrom
fix_colors_3.x
Apr 13, 2026
Merged

Force truecolor support to avoid automatic color detection. (3.x)#1633
kmvanbrunt merged 1 commit into3.xfrom
fix_colors_3.x

Conversation

@kmvanbrunt
Copy link
Copy Markdown
Member

@kmvanbrunt kmvanbrunt commented Apr 13, 2026

Explicitly set the color system to "truecolor" in Cmd2BaseConsole and rich_text_to_string() when styling is allowed. This avoids Rich's automatic color detection, which can strip colors in test environments where TERM=dumb is set.

@kmvanbrunt kmvanbrunt requested a review from tleonhardt as a code owner April 13, 2026 22:08
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Hi @kmvanbrunt, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (3.x@0b0ef95). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             3.x    #1633   +/-   ##
======================================
  Coverage       ?   99.24%           
======================================
  Files          ?       21           
  Lines          ?     4869           
  Branches       ?        0           
======================================
  Hits           ?     4832           
  Misses         ?       37           
  Partials       ?        0           
Flag Coverage Δ
unittests 99.24% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 I'm sorry @kmvanbrunt, but I was unable to process your request. Please see the logs for more details.

Explicitly set the color system to "truecolor" in Cmd2BaseConsole and
rich_text_to_string() when styling is allowed. This avoids Rich's
automatic color detection, which can strip colors in test environments
where TERM=dumb is set.
@tleonhardt
Copy link
Copy Markdown
Member

@kmvanbrunt What is the plan for making similar changes on the main branch?

@kmvanbrunt kmvanbrunt merged commit c173b47 into 3.x Apr 13, 2026
28 checks passed
@kmvanbrunt kmvanbrunt deleted the fix_colors_3.x branch April 13, 2026 22:27
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.

2 participants