未验证 提交 ba0a8d2e 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #73219 - RalfJung:cargo-json, r=Mark-Simulacrum

x.py: with --json-output, forward cargo's JSON

Fixes https://github.com/rust-lang/rust/issues/73209

r? @Mark-Simulacrum
......@@ -983,7 +983,13 @@ pub fn stream_cargo(
for line in stdout.lines() {
let line = t!(line);
match serde_json::from_str::<CargoMessage<'_>>(&line) {
Ok(msg) => cb(msg),
Ok(msg) => {
if builder.config.json_output {
// Forward JSON to stdout.
println!("{}", line);
}
cb(msg)
}
// If this was informational, just print it out and continue
Err(_) => println!("{}", line),
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册