rustc: Disable color codes in non-tty terminal environments
ea95ff9
Opened by Andrew at
When rustc is invoked from non-tty shell contexts, such as being piped to less rustc ... | less, or when rustc is run from an Emacs or Vim terminal, then terminal codes like $<2> should not be emitted on compiler messages.
On linux, I can't find an old release of rustc that sent ANSI coloring escape codes when its output wasn't a TTY. I think this old issue can be closed.
Andrew Chin at 2020-11-27 19:27:17
For me
echo | rustc - | lessshows colors.bjorn3 at 2022-05-15 16:39:29