From 263c7b058082b44144a9af31d58b6d63bcbcc2f6 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 20 Jun 2024 11:03:36 +0100 Subject: [PATCH] fix compilation --- CHANGELOG.md | 2 +- crates/biome_cli/src/main.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba418ae15ad9..55fff264031d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b - Fix [#3201](https://github.com/biomejs/biome/issues/3201) by correctly injecting the source code of the file when printing the diagnostics. Contributed by @ematipico - Fix [#3179](https://github.com/biomejs/biome/issues/3179) where comma separators are not correctly removed after running `biome migrate` and thus choke the parser. Contributed by @Sec-ant - +- Fix [#3232](https://github.com/biomejs/biome/issues/3232) by correctly using the colors set by the user. Contributed by @ematipico #### Enhancement - Reword the reporter message `No fixes needed` to `No fixes applied`. diff --git a/crates/biome_cli/src/main.rs b/crates/biome_cli/src/main.rs index c6e6a7a20a78..4c8ad894363e 100644 --- a/crates/biome_cli/src/main.rs +++ b/crates/biome_cli/src/main.rs @@ -39,8 +39,12 @@ fn main() -> ExitCode { let color_mode = to_color_mode(command.get_color()); // we want force colours in CI, to give e better UX experience - if matches!(command, BiomeCommand::Ci { .. }) { - console.set_color(ColorMode::Enabled); + if let BiomeCommand::Ci { cli_options, .. } = &command { + if cli_options.colors.is_none() { + console.set_color(ColorMode::Enabled); + } else { + console.set_color(color_mode); + } } else { console.set_color(color_mode); }