diff options
author | bartOssh <lenart.consulting@gmail.com> | 2020-09-16 15:38:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 15:38:38 +0200 |
commit | 81ca7096c5e8830cf8707c77fd244672e7e67c79 (patch) | |
tree | ff73340eb97b2601b41903a641b4cb99911f8aa5 /cli/main.rs | |
parent | d4a24c870e87b55dab425bc2c320aa88a6224030 (diff) |
refactor(unstable): deno info --json output (#7417)
Provide flat JSON structured output.
Fix BrokenPipe error when piping out to "head".
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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) } } } |