From 81ca7096c5e8830cf8707c77fd244672e7e67c79 Mon Sep 17 00:00:00 2001 From: bartOssh Date: Wed, 16 Sep 2020 15:38:38 +0200 Subject: refactor(unstable): deno info --json output (#7417) Provide flat JSON structured output. Fix BrokenPipe error when piping out to "head". --- cli/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/main.rs') diff --git a/cli/main.rs b/cli/main.rs index a300c3d69..d121d1c92 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -187,8 +187,8 @@ async fn info_command( if json { write_json_to_stdout(&json!(info)) } else { - print!("{}", info); - Ok(()) + write_to_stdout_ignore_sigpipe(format!("{}", info).as_bytes()) + .map_err(AnyError::from) } } } -- cgit v1.2.3