cargo-unleash icon indicating copy to clipboard operation
cargo-unleash copied to clipboard

Unreadable error messages on certain terminal emulators

Open koute opened this issue 3 years ago • 2 comments

I was quite confused getting the following error messages from cargo-unleash when trying to run it locally:

unleash

Apparently those error messages were printed out with a black text color, and since my terminal background is also black the text is effectively invisible. If I copy-paste the text somewhere else (or redirect cargo-unleash's output to a file) I can read the error messages just fine:

ERROR [cargo_unleash::commands::check] "node-runtime: Bad metadata: description is missing"
ERROR [cargo_unleash::commands::check] "node-bench: Bad metadata: repository is missing"
ERROR [cargo_unleash::commands::check] "node-inspect: Bad metadata: description is missing"
ERROR [cargo_unleash::commands::check] "node-rpc: Bad metadata: description is missing"
Error: "Soft checkes failed with 4 errors (see above)"

Just for reference, I'm using rxvt-unicode as my terminal and I'm launching it with the following parameters:

urxvt -name Terminal -internalBorder 12 -externalBorder 0 \
            -bw 0 -xrm "URxvt.perl-ext: \"\"" \
            -xrm "URxvt.perl-ext-common: \"\"" \
            --color4 "#3333ff" \
            --color12 "#6666ff" \
            -fn "xft:Monospace:pixelsize=13:antialias=false","xft:Meiryo:pixelsize=13:antialias=true" \
            +sb -geometry 120x36 \
            -fg rgb:ffff/ffff/ffff \
            -borderColor rgba:0000/0000/0000/aaaa -bg rgba:0000/0000/0000/7777

koute avatar Dec 10 '21 11:12 koute

hmmm... that's odd. Quick investigation tells me, this is must be the default print-format for the anyhow:Error, we just bubble all the way up to main, just containing a bunch of string - we aren't doing anything else to it on the cargo-unleash-side :thinking: ...

gnunicorn avatar Dec 10 '21 12:12 gnunicorn

Yeah, I found it quite strange too; it's probably not an issue on cargo-unleash side per-se, I just wanted to document it here in case anyone also gets confused as to why the errors are not being displayed.

koute avatar Dec 10 '21 12:12 koute