Closed ijackson closed 2 months ago
Could you provide reproduction steps? We should be checking TERM=dumb
(not minimised, sorry)
git clone https://gitlab.torproject.org/tpo/core/arti.git
cd arti
git checkout 5e2d5532d002c9df9a4cf6d83cdbe7d6125bc4be
perl -i~ -pe 's/flamingo is not configured/XXXX/' crates/arti/tests/testcases/hss/hss.md
TERM=xterm cargo test --locked --offline -p arti --all-features -- cli_tests
TERM=dumb cargo test --locked --offline -p arti --all-features -- cli_tests
Two error reports with coloured output, including in overview report, and coloured diff.
I may be confused, but during my testing they appeared to be influenced by previous runs. Hence the two step process above.
I can see the colour escape sequences if I add 2>&1 | cat -vet
$ git checkout 3957a384aca2cef964e86ba9ad48d98c6f4cf0dc
I got an error that that commit wasn't in my tree
I got an error that that commit wasn't in my tree
Sorry about that. Fixed it, please use 5e2d5532d002c9df9a4cf6d83cdbe7d6125bc4be (if you still need it...)
When running trycmd in an environment without a graphical terminal (for example, an emacs M-x compile window) trycmd still produces colourised output.
trycmd should look at TERM to decide whether to colourise the output. At the very least, if TERM=dumb it should avoid sending control codes.
CC @gabi-250 (since this is related to use of trycmd in Arti's tests)