Closed piotrbartman closed 3 years ago
If the use of click wrapping on stdout causes click to not recognize standard output as a terminal and all formatting (ANSI codes) is discarded.
import click import progressbar progressbar.streams.wrap_stdout() click.secho("text", fg="red") # white text
It can be fixed by:
sys.stdout.isatty = progressbar.streams.original_stdout.isatty
I think it can be fixed by expose in WrappingIO class isatty method of target.
WrappingIO
isatty
Thank you for the report and the suggested fix :)
It appears to be working great for me now so I've pushed a new release
Description
If the use of click wrapping on stdout causes click to not recognize standard output as a terminal and all formatting (ANSI codes) is discarded.
Code
It can be fixed by:
I think it can be fixed by expose in
WrappingIO
classisatty
method of target.Versions