-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters