You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to test that a click command uses colors correctly. I've set the color=True argument to runner.invoke and this keeps the ansi escape codes as expected on Linux. However, on Windows these are completely stripped, as if color=False was set.
I did see #2606 and #2607, but testing the change there isn't enough to fix this for me. I think the problem is that color=True isn't set in the Context on Windows and therefore ctx.color is still None in resolve_color_default, despite color=True being passed to invoke.
Environment:
Python version: 3.8 - 3.12
Click version: 8.1.7
The text was updated successfully, but these errors were encountered:
I am trying to test that a click command uses colors correctly. I've set the
color=True
argument torunner.invoke
and this keeps the ansi escape codes as expected on Linux. However, on Windows these are completely stripped, as ifcolor=False
was set.I did see #2606 and #2607, but testing the change there isn't enough to fix this for me. I think the problem is that
color=True
isn't set in theContext
on Windows and thereforectx.color
is stillNone
inresolve_color_default
, despitecolor=True
being passed toinvoke
.Environment:
The text was updated successfully, but these errors were encountered: