Skip to content

Commit

Permalink
fix indicatif progress bars in dev mode (#1195)
Browse files Browse the repository at this point in the history
Fixes #881
  • Loading branch information
jdx authored Dec 15, 2023
1 parent 31890a8 commit f3e59d0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ui/progress_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ impl ProgressReport {

impl SingleReport for ProgressReport {
fn println(&self, message: String) {
self.pb.println(message);
self.pb.suspend(|| {
eprintln!("{message}");
});
}
fn warn(&self, message: String) {
let msg = format!("{} {message}", style("[WARN]").yellow().for_stderr());
Expand Down Expand Up @@ -169,8 +171,9 @@ impl SingleReport for VerboseReport {
error!("{prefix} {x} {message}");
}
fn set_message(&self, message: String) {
let prefix = normal_prefix(self.pad, &self.prefix);
eprintln!("{prefix} {message}");
// let prefix = normal_prefix(self.pad, &self.prefix);
// eprintln!("{prefix} {message}");
eprintln!("{message}");
}
fn finish(&self) {
self.finish_with_message(style("done").green().for_stderr().to_string());
Expand Down

0 comments on commit f3e59d0

Please sign in to comment.