diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-06-11 13:16:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-11 13:16:12 +0200 |
| commit | ba0a8d2ee79e966d270690b7154bd3bfe2ba61aa (patch) | |
| tree | 06315ed68a5156efe6d78d5a39c7054172c07a05 | |
| parent | 822bb9a1cb9025b8397167c039cb90935c6a76b2 (diff) | |
| parent | f507748ce49f8e9ce5dc76bb7811a374c814923f (diff) | |
| download | rust-ba0a8d2ee79e966d270690b7154bd3bfe2ba61aa.tar.gz rust-ba0a8d2ee79e966d270690b7154bd3bfe2ba61aa.zip | |
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
| -rw-r--r-- | src/bootstrap/compile.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index b3999118e3d..c09b73b0420 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -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), } |
