From a967854332215f57ee03e460872eddde8ada7181 Mon Sep 17 00:00:00 2001 From: Genna Wingert Date: Fri, 18 Feb 2022 15:10:20 +0100 Subject: [PATCH] Fix stream printing on Windows (#4527) Co-authored-by: Genna Wingert --- src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 843ce9ee45..51c6edc4f0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -198,11 +198,11 @@ fn print_pipeline_data( let config = stack.get_config().unwrap_or_default(); - let mut stdout = std::io::stdout(); + let stdout = std::io::stdout(); if let PipelineData::RawStream(stream, _, _) = input { for s in stream { - let _ = stdout.write(s?.as_binary()?); + let _ = stdout.lock().write_all(s?.as_binary()?); } return Ok(()); }