Commit fc65237
committed
Fix ANSI colors stripped when TERM=dumb or color system undetectable
These patches were developed during Debian rebuild testing with Python 3.13,
where all ANSI sequences were silently stripped even with ALLOW_STYLE=ALWAYS.
The root cause is that Rich's _detect_color_system() returns None when
TERM=dumb, overriding force_terminal=True. Debian build infrastructure always
sets TERM=dumb to prevent interactive terminal usage during builds.1 parent 1d6910a commit fc65237
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
169 | 171 | | |
170 | 172 | | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
| 185 | + | |
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
| |||
414 | 418 | | |
415 | 419 | | |
416 | 420 | | |
| 421 | + | |
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3756 | 3756 | | |
3757 | 3757 | | |
3758 | 3758 | | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
3759 | 3762 | | |
3760 | 3763 | | |
3761 | 3764 | | |
| |||
0 commit comments