forked from SergioBenitez/version_check
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse the version and date from verbose info
The plain `rustc --version` string is not well structured, and in particular the git commit info is not necessarily present when rustc was built out of tree, like distro builds. Furthermore, rust-lang/rust#79115 made it possible to have completely custom information in that version's parenthesized block, which may not look like git info at all. Adding `--verbose` outputs each field on its own line, in particular "release: ..." for the version number and "commit-date: ..." for the git info, although the latter is just "unknown" for out-of-tree builds. This still works all the way back to Rust 1.0.0.
- Loading branch information
Showing
1 changed file
with
113 additions
and
4 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