basalt-rs/bedrock

Force ANSI colour output when possible

Aperta

#44 aperta il 10 ott 2025

 (0 commenti) (0 reazioni) (0 assegnatari)Rust (0 fork)auto 404
enhancementgood first issue

Metriche repository

Star
 (0 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Many compilers/runtimes will automatically strip colour when the program detects that it's not in a terminal. Often, we can get around this by specifying a flag like --color=always so it will print things like errors in colour. Since our frontend supports ANSI colour codes, we should have the built-in commands attempt to do this.

For example, with rust:

rustc -o solution solution.rs
# becomes
rustc -o solution --color=always solution.rs

Guida contributor