Skip to content

Commit ba0a8d2

Browse files
authored
Rollup merge of #73219 - RalfJung:cargo-json, r=Mark-Simulacrum
x.py: with --json-output, forward cargo's JSON Fixes #73209 r? @Mark-Simulacrum
2 parents 822bb9a + f507748 commit ba0a8d2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bootstrap/compile.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,13 @@ pub fn stream_cargo(
983983
for line in stdout.lines() {
984984
let line = t!(line);
985985
match serde_json::from_str::<CargoMessage<'_>>(&line) {
986-
Ok(msg) => cb(msg),
986+
Ok(msg) => {
987+
if builder.config.json_output {
988+
// Forward JSON to stdout.
989+
println!("{}", line);
990+
}
991+
cb(msg)
992+
}
987993
// If this was informational, just print it out and continue
988994
Err(_) => println!("{}", line),
989995
}

0 commit comments

Comments
 (0)