Skip to content

Commit 7f64565

Browse files
committed
deploy: Use bar.println
In some cases I wasn't seeing this output, and I think it's because we hadn't `drop()`'d the bar. Since it's in scope it's cleaner to use its `println` method. Signed-off-by: Colin Walters <[email protected]>
1 parent cc6ddc3 commit 7f64565

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/src/deploy.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ async fn handle_layer_progress_print(
211211
let elapsed = end.duration_since(start);
212212
let persec = total_read as f64 / elapsed.as_secs_f64();
213213
let persec = indicatif::HumanBytes(persec as u64);
214-
println!(
214+
if let Err(e) = bar.println(&format!(
215215
"Fetched layers: {} in {} ({}/s)",
216216
indicatif::HumanBytes(total_read),
217217
indicatif::HumanDuration(elapsed),
218218
persec,
219-
);
219+
)) {
220+
tracing::warn!("writing to stdout: {e}");
221+
}
220222
}
221223

222224
/// Wrapper for pulling a container image, wiring up status output.

0 commit comments

Comments
 (0)