mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 08:37:56 +00:00
Make build work with rustc 1.37 stable and RUSTC_BOOTSTRAP=1 (#3844)
* Make build work with rustc 1.37 stable and RUSTC_BOOTSTRAP=1 * Bump versions to run CI
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
use std::{process::{Command, Stdio}, fs};
|
||||
|
||||
use std::env;
|
||||
use tempfile::tempdir;
|
||||
|
||||
/// Checks that all prerequisites are installed.
|
||||
@@ -23,7 +24,7 @@ use tempfile::tempdir;
|
||||
/// # Returns
|
||||
/// Returns `None` if everything was found and `Some(ERR_MSG)` if something could not be found.
|
||||
pub fn check() -> Option<&'static str> {
|
||||
if !check_nightly_installed() {
|
||||
if !rustc_stable_forced_to_nightly() && !check_nightly_installed(){
|
||||
return Some("Rust nightly not installed, please install it!")
|
||||
}
|
||||
|
||||
@@ -39,6 +40,10 @@ pub fn check() -> Option<&'static str> {
|
||||
check_wasm_toolchain_installed()
|
||||
}
|
||||
|
||||
fn rustc_stable_forced_to_nightly() -> bool {
|
||||
env::var("RUSTC_BOOTSTRAP") == Ok("1".to_string())
|
||||
}
|
||||
|
||||
fn check_nightly_installed() -> bool {
|
||||
let command = crate::get_nightly_cargo();
|
||||
command.is_nightly()
|
||||
|
||||
Reference in New Issue
Block a user