Skip to content

Commit

Permalink
fix(cli): correctly compute the color mode in ci (#3244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Jun 20, 2024
1 parent 8e55bcf commit 698612b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
8 changes: 6 additions & 2 deletions crates/biome_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 698612b

Please sign in to comment.