Skip to content

Commit e0734e6

Browse files
committed
internal: tweak log behavior
1 parent efcd9db commit e0734e6

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/progress.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,10 @@ impl Progress for DumbConsoleProgress {
101101
// ignore
102102
}
103103

104-
fn task_finished(&mut self, id: BuildId, build: &Build, result: &TaskResult) {
104+
fn task_finished(&mut self, _id: BuildId, build: &Build, result: &TaskResult) {
105105
match result.termination {
106106
Termination::Success => {
107-
if result.output.is_empty() || self.last_started == Some(id) {
108-
// Output is empty, or we just printed the command, don't print it again.
109-
} else {
110-
self.log(build_message(build, false))
111-
}
107+
// Common case: don't show anything.
112108
}
113109
Termination::Interrupted => {
114110
self.log_when_failed(&format!("interrupted: {}", build_message(build, true)))
@@ -281,11 +277,7 @@ impl FancyState {
281277
.remove(self.tasks.iter().position(|t| t.id == id).unwrap());
282278
match result.termination {
283279
Termination::Success => {
284-
if result.output.is_empty() {
285-
// Common case: don't show anything.
286-
} else {
287-
self.log(build_message(build, false))
288-
}
280+
// Common case: don't show anything.
289281
}
290282
Termination::Interrupted => self.log_when_failed(&format!(
291283
"{} {}",
@@ -311,9 +303,7 @@ impl FancyState {
311303

312304
fn log(&mut self, msg: &str) {
313305
self.clear_progress();
314-
if self.callback.is_none() {
315-
println!("{}", msg);
316-
}
306+
println!("{}", msg);
317307
self.dirty();
318308
}
319309

0 commit comments

Comments
 (0)