mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Fix stream printing on Windows (#4527)
Co-authored-by: Genna Wingert <wingertge@gmail.com>
This commit is contained in:
parent
a5f9ad2a43
commit
a967854332
1 changed files with 2 additions and 2 deletions
|
@ -198,11 +198,11 @@ fn print_pipeline_data(
|
||||||
|
|
||||||
let config = stack.get_config().unwrap_or_default();
|
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 {
|
if let PipelineData::RawStream(stream, _, _) = input {
|
||||||
for s in stream {
|
for s in stream {
|
||||||
let _ = stdout.write(s?.as_binary()?);
|
let _ = stdout.lock().write_all(s?.as_binary()?);
|
||||||
}
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue