Cargo: malformed formatting for nontty environments
⚓ Rust 📅 2026-01-23 👤 surdeus 👁️ 2Hi,
cargo update, cargo audit, and other cargo commands force terminal escape sequences in nontty environments, such as redirection to a file (cargo update >log.txt 2>&1, as well as piping (cargo update | less). This results in noisy text that is unnecessarily more difficult to read.
As a workaround, I have to set the environment variable CARGO_TERM_COLOR to never.
This is one anti-feature that I didn't want cargo to copy from NPM.
2 posts - 2 participants
🏷️ Rust_feed