You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically install override toolchain when missing.
A typical scenario is:
* I work on a repository that uses `rust-toolchain` to pin to a specific Nightly version
* I run `git pull`, `rust-toolchain` has been changed to update to a new Rust version
* I run `cargo build`
Result before this PR (typically): rustup fails with an error like:
```
error: override toolchain 'nightly-2017-08-31' is not installed
info: caused by: the toolchain file at '/home/simon/projects/servo/rust-toolchain' specifies an uninstalled toolchain
```
A better result would be to install toolchains as needed.
Closesrust-lang#1218
let stdout = String::from_utf8(out.stdout).unwrap();
627
+
let stderr = String::from_utf8(out.stderr).unwrap();
631
628
assert!(!stdout.contains("not a directory"));
632
-
assert!(Regex::new(r"error: override toolchain 'nightly.*' is not installed, the directory override for '.*' specifies an uninstalled toolchain").unwrap().is_match(&stdout))
// I'm not sure this should really be erroring when the toolchain
662
-
// is not installed; just capturing the behavior.
663
659
assert!(out.status.success());
664
660
let stdout = String::from_utf8(out.stdout).unwrap();
665
-
assert!(stdout.contains("override toolchain 'nightly' is not installed, the RUSTUP_TOOLCHAIN environment variable specifies an uninstalled toolchain"));
661
+
let stderr = String::from_utf8(out.stderr).unwrap();
0 commit comments