-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anstyle-query's term_supports_ansi_color isn't quite right on Windows #210
Comments
From how I use that check, I think we have different expectations for it. I treat anstyle/crates/anstream/src/auto.rs Lines 112 to 122 in 4b8b9c5
|
Oh I see! That makes sense then. But yeah it definitely didn't match my expectations of how that function works. |
I guess it might be worth updating the comment because it's not actually strange that TERM isn't set on Windows — only things like mintty set it. |
Wow, looks like I butchered |
All right, I think this looks good. Thanks! |
Hey!
I was checking out anstyle-query and saw this bit of code:
anstyle/crates/anstyle-query/src/lib.rs
Lines 97 to 99 in 4b8b9c5
I checked both conhost.exe and Windows Terminal and neither of them set
TERM
. But they do support ANSI colors on all versions of Windows 10 after 1511, so returningfalse
isn't quite right.I guess this makes sense for anstream, which can fall back to Windows console library calls, but if some other crate decides to use anstyle-query and only supports ANSI colors then they're going to get a misleading answer sadly.
The text was updated successfully, but these errors were encountered: