Skip to content

Commit c9f7f7a

Browse files
daeevmar
authored andcommitted
Honor hide_success in the dumb progress path
1 parent 18b1ff6 commit c9f7f7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/progress_dumb.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,22 @@ impl Progress for DumbConsoleProgress {
4646
}
4747

4848
fn task_finished(&self, id: BuildId, build: &Build, result: &TaskResult) {
49+
let mut hide_output = result.output.is_empty();
4950
match result.termination {
5051
Termination::Success => {
5152
if result.output.is_empty() || self.last_started.get() == Some(id) {
5253
// Output is empty, or we just printed the command, don't print it again.
5354
} else {
5455
self.log(build_message(build))
5556
}
57+
if build.hide_success {
58+
hide_output = true;
59+
}
5660
}
5761
Termination::Interrupted => self.log(&format!("interrupted: {}", build_message(build))),
5862
Termination::Failure => self.log(&format!("failed: {}", build_message(build))),
5963
};
60-
if !result.output.is_empty() {
64+
if !hide_output {
6165
std::io::stdout().write_all(&result.output).unwrap();
6266
}
6367
}

0 commit comments

Comments
 (0)