Skip to content

Commit

Permalink
feat: output field information in green and messages in orange(progre…
Browse files Browse the repository at this point in the history
…ss bar msg)
  • Loading branch information
fukusuket committed Nov 15, 2024
1 parent ba1da35 commit 81dfe1c
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,12 @@ impl App {
|| stored_static.log_metrics_flag);

if !is_timeline_cmd {
pb.finish_with_message("Scanning finished.");
let msg = if stored_static.common_options.no_color {
style("Scanning finished.\n").color256(15).to_string()
} else {
style("Scanning finished.\n").color256(214).to_string()
};
pb.finish_with_message(msg);
}
CHECKPOINT
.lock()
Expand Down Expand Up @@ -1870,13 +1875,22 @@ impl App {
afterfact_info.tl_endtime = tl.stats.end_time;

let msg = if stored_static.output_path.is_some() {
style("Scanning finished. Please wait while the results are being saved.\n")
.color256(214)
if stored_static.common_options.no_color {
style("Scanning finished. Please wait while the results are being saved.\n")
.color256(15)
.to_string()
} else {
style("Scanning finished. Please wait while the results are being saved.\n")
.color256(214)
.to_string()
}
} else if stored_static.common_options.no_color {
style("Scanning finished.\n").color256(15).to_string()
} else {
style("Scanning finished.\n").color256(214)
style("Scanning finished.\n").color256(214).to_string()
};
// Convert the ColoredString to a String before passing it
pb.finish_with_message(msg.to_string());
pb.finish_with_message(msg);

// output afterfact
if stored_static.is_low_memory {
Expand Down

0 comments on commit 81dfe1c

Please sign in to comment.