Fix stream printing on Windows (#4527)

Co-authored-by: Genna Wingert <wingertge@gmail.com>
This commit is contained in:
Genna Wingert 2022-02-18 15:10:20 +01:00 committed by GitHub
parent a5f9ad2a43
commit a967854332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(());
}