forked from rust-lang/docs.rs
-
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.
Adding a configuration option to specify rustc version used
This code is maybe not as elegant as it could be but should hopefully work? I'm not 100% sure how the crates are built (i.e. how the working directories are built and scoped) so I hope that `rustup` is invoked in the correct directory. If that's not the case, then this can be changed. Additionally I am aware that this is a **work in progress** and further changes are required on docs.rs and the compilers part to make "hot-swapping" versions easier. See rust-lang#225 for more details. This PR addresses rust-lang#228
- Loading branch information
1 parent
32102ce
commit bdfb048
Showing
4 changed files
with
35 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ mod daemon; | |
mod pubsubhubbub; | ||
mod rustc_version; | ||
mod html; | ||
mod rustup; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! A wrapper around using rustup | ||
//! | ||
|
||
use std::process::Command; | ||
|
||
/// Invoke rustup in a folder to `override set` a rustc version | ||
pub fn set_version(v: String) { | ||
Command::new("rustup") | ||
.arg("override") | ||
.arg("set") | ||
.arg(v) | ||
.output() | ||
.unwrap(); | ||
} |