Skip to content

Commit

Permalink
fix: --no-color case
Browse files Browse the repository at this point in the history
  • Loading branch information
fukusuket committed Nov 15, 2024
1 parent 8100cd8 commit bdd77b6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/detections/detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,10 @@ impl Detection {
let val = format!("{}{}", value.to_formatted_string(&Locale::en), disable_flag);
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
Some(Color::Rgb(0, 255, 0)),
get_writable_color(
Some(Color::Rgb(0, 255, 0)),
stored_static.common_options.no_color,
),
key.as_str(),
false,
)
Expand Down Expand Up @@ -1208,7 +1211,10 @@ impl Detection {
);
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
Some(Color::Rgb(0, 255, 0)),
get_writable_color(
Some(Color::Rgb(0, 255, 0)),
stored_static.common_options.no_color,
),
key.as_str(),
false,
)
Expand Down
10 changes: 8 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,10 @@ impl App {
println!();
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
Some(Color::Rgb(255, 175, 0)),
get_writable_color(
Some(Color::Rgb(255, 175, 0)),
stored_static.common_options.no_color,
),
wait_message,
true,
)
Expand Down Expand Up @@ -1656,7 +1659,10 @@ impl App {
{
write_color_buffer(
&BufferWriter::stdout(ColorChoice::Always),
Some(Color::Rgb(255, 175, 0)),
get_writable_color(
Some(Color::Rgb(255, 175, 0)),
stored_static.common_options.no_color,
),
"Creating the channel filter. Please wait.",
true,
)
Expand Down

0 comments on commit bdd77b6

Please sign in to comment.