rust-cli / anstyle

ANSI text styling
https://docs.rs/anstyle
Other
120 stars 19 forks source link

Guidance re debugging #111

Closed max-sixty closed 1 year ago

max-sixty commented 1 year ago

We recently got an issue re colors being printed when they shouldn't be — https://github.com/PRQL/prql/issues/3285.

Would you have any guidance for how to handle these?

I can see a few possible sources of error:

Is there some command we could ask someone to run to help assess whether it's a misconfiguration? i.e. "run this, it might show that your terminal reports that it can handle colors". It could even give the reason that colors are being printed — i.e. "CLI_COLOR=1 so we're printing colors".

Or any other guidance? At the moment I'm not sure what to say beyond "meh maybe a bug maybe not"...

Thanks, and appreciate the patience with the open-ended question.

epage commented 1 year ago

If they can run

$ cargo install anstyle-query --examples --root anstyle-query
$ anstyle-query/bin/report
clicolor: None
clicolor_force: false
no_color: false
term_supports_ansi_color: true
term_supports_color: true
truecolor: true
enable_ansi_colors: None
is_ci: false
max-sixty commented 1 year ago

Perfect! Closing this, can reopen if anything comes up on the issue per se