mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -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::Extension;
|
||||||
use crate::OpState;
|
use crate::OpState;
|
||||||
use crate::ZeroCopyBuf;
|
use crate::ZeroCopyBuf;
|
||||||
use std::io::{stdout, Write};
|
use std::io::{stderr, stdout, Write};
|
||||||
|
|
||||||
pub(crate) fn init_builtins() -> Extension {
|
pub(crate) fn init_builtins() -> Extension {
|
||||||
Extension::builder()
|
Extension::builder()
|
||||||
|
@ -64,7 +64,7 @@ pub fn op_print(
|
||||||
let (msg, is_err) = args;
|
let (msg, is_err) = args;
|
||||||
if is_err {
|
if is_err {
|
||||||
eprint!("{}", msg);
|
eprint!("{}", msg);
|
||||||
stdout().flush().unwrap();
|
stderr().flush().unwrap();
|
||||||
} else {
|
} else {
|
||||||
print!("{}", msg);
|
print!("{}", msg);
|
||||||
stdout().flush().unwrap();
|
stdout().flush().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue