]> git.proxmox.com Git - cargo.git/commit
Auto merge of #3410 - fmdkdd:fix-3390-message-format-parse-stderr, r=alexcrichton
authorbors <bors@rust-lang.org>
Mon, 19 Dec 2016 17:04:04 +0000 (17:04 +0000)
committerbors <bors@rust-lang.org>
Mon, 19 Dec 2016 17:04:04 +0000 (17:04 +0000)
commit109d9c5ec64bcc61343d713fc00bb72bfc18d804
treea8afd60ded39cf078d633d28309b81247966e53f
parentddb5c328d67f046c929928f161d50eef1cbc3e81
parent3e3250373277b0af4d8dc35181ebf76b9d9fb316
Auto merge of #3410 - fmdkdd:fix-3390-message-format-parse-stderr, r=alexcrichton

Fix `--message-format JSON` when rustc emits non-JSON warnings

The `--message-format JSON` flag parses all the stderr output of rustc to JSON,
but rustc can emit non-JSON lines to stderr (e.g., for warning about the
unstable `-Z` flag on the stable channel), causing cargo to fail reporting
compilation errors when using `--message-format JSON`.

This commit adds a check to look for lines beginning with `{` to only parse
these lines as JSON.  Other lines from rustc are forwarded to the stderr of
cargo.

Fixes #3390.