mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
fix(core/print): flush stderr (#10480)
This commit is contained in:
parent
688557e226
commit
3a37444cb5
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ use crate::resources::ResourceId;
|
|||
use crate::Extension;
|
||||
use crate::OpState;
|
||||
use crate::ZeroCopyBuf;
|
||||
use std::io::{stdout, Write};
|
||||
use std::io::{stderr, stdout, Write};
|
||||
|
||||
pub(crate) fn init_builtins() -> Extension {
|
||||
Extension::builder()
|
||||
|
@ -64,7 +64,7 @@ pub fn op_print(
|
|||
let (msg, is_err) = args;
|
||||
if is_err {
|
||||
eprint!("{}", msg);
|
||||
stdout().flush().unwrap();
|
||||
stderr().flush().unwrap();
|
||||
} else {
|
||||
print!("{}", msg);
|
||||
stdout().flush().unwrap();
|
||||
|
|
Loading…
Reference in a new issue