-
Notifications
You must be signed in to change notification settings - Fork 56
Getting raw ansi codes in windows terminal #80
Comments
Is it only color-eyre that is doing this? I'm curious to see if you use other cli tools that colorize their output, do their color codes show up verbatim or does it still work? And if so are they outputting ANSI escape codes or are they using windows APIs? I don't have access to Windows Terminal Preview atm so it might take me a while to get around to reproducing this myself. |
Crates depending on
Crates depending on
Crates depending on
Looks like it's only Windows Terminal: https://github.com/microsoft/terminal/releases/tag/v1.7.572.0 |
wow, other crates depending on |
color-eyre: ^1.2.1 If not installed with the Edit: I did more testing. I have a crate that hard-encodes ANSI colored strings into it: pub const INFO_SYMBOL: Emoji = Emoji::new("\u{1b}[34mℹ\u{1b}[0m", "\u{1b}[34mi\u{1b}[0m"); And these fail as well: $ gh labels -r https://github.com/SirWindfield/terminal-spinners-rs update --purge
←[34mℹ←[0m Purging all 24 labels...
←[34mℹ←[0m Repository has 0 labels, creating 24 and updating 0... I am so clueless... I have no clue why one CLI ( |
- add required nvcuda.dll for those who don't have it - lower CUDA (therefore nvidia driver) requirements - untrack PTX I am aware of an issue with ANSI escape sequences showing in windows terminals. This seems related to eyre-rs/color-eyre#80 and the owo_colors crate. Not sure how to fix that. Maybe switch to anyhow and use crossterm instead of owo colors would work, but we would loose the colorful error reports.
I'm running into this issue as well, except cross-compiled on Linux, running through Wine: cargo run --target x86_64-pc-windows-gnu --example=usage
# or if you don't use a binfmt
cargo build --target x86_64-pc-windows-gnu --example=usage
wine ./target/x86_64-pc-windows-gnu/debug/examples/usage.exe Interestingly, the tracing event log is perfectly colored, and bold and italics always work. Only color codes in the error message and span trace are messed up. Version: 4a7b4d6 |
Any temporary fix to this, such as conditionally disabling color on windows? Ive looked but not found a way to disable color for windows, unless i pull in regular eyre just for said windows build. |
Not sure why this happens as I always thought Windows terminal supports ANSI escape codes. Here is an example output:
Windows Terminal Preview
Version: 1.7.572.0
rustc 1.50.0 (cb75ad5db 2021-02-10)
color-eyre 0.5.10
eyre 0.6.5
The text was updated successfully, but these errors were encountered: