diff --git a/crates/puffin/src/main.rs b/crates/puffin/src/main.rs index 06b87ea44..9d72db1b2 100644 --- a/crates/puffin/src/main.rs +++ b/crates/puffin/src/main.rs @@ -57,6 +57,10 @@ struct Cli { #[arg(global = true, long, short, conflicts_with = "quiet")] verbose: bool, + /// Disable colors. + #[arg(global = true, long)] + no_color: bool, + #[command(flatten)] cache_args: CacheArgs, } @@ -552,6 +556,10 @@ async fn inner() -> Result { puffin_warnings::enable(); } + if cli.no_color { + anstream::ColorChoice::write_global(anstream::ColorChoice::Never); + } + miette::set_hook(Box::new(|_| { Box::new( miette::MietteHandlerOpts::new()