Skip to content

Commit 95ce914

Browse files
committed
avoid showing colors outside of ttys
1 parent bbc2657 commit 95ce914

File tree

3 files changed

+8
-31
lines changed

3 files changed

+8
-31
lines changed

Cargo.lock

Lines changed: 5 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ percent-encoding = "2.1.0"
3232
threadpool = "1.8.1"
3333
tracing = "0.1.16"
3434
tracing-subscriber = "0.2.8"
35+
atty = "0.2.14"

src/bin/util/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ impl std::str::FromStr for CliCiPlatform {
3838

3939
pub fn run<F: FnOnce() -> rla::Result<()>>(f: F) {
4040
tracing_subscriber::fmt()
41+
.with_writer(std::io::stderr)
42+
.with_ansi(atty::is(atty::Stream::Stderr))
4143
.with_env_filter(tracing_subscriber::EnvFilter::from_env("RLA_LOG"))
4244
.init();
4345

0 commit comments

Comments
 (0)