summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorbartOssh <lenart.consulting@gmail.com>2020-09-16 15:38:38 +0200
committerGitHub <noreply@github.com>2020-09-16 15:38:38 +0200
commit81ca7096c5e8830cf8707c77fd244672e7e67c79 (patch)
treeff73340eb97b2601b41903a641b4cb99911f8aa5 /cli/main.rs
parentd4a24c870e87b55dab425bc2c320aa88a6224030 (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.rs4
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)
}
}
}