From 2e9b4405edb4d285cc51c15da2cc4d0785e7c32d Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Date: Fri, 19 Jan 2024 17:12:30 +0100 Subject: [PATCH] Contract fixtures tests: fixe nightly version (#3000) Using just `nightly` is too generic and can fail on different systems. Now its fixed to the nightly version of the CI. Another way would be to use a toolchain file, since this already assumes `rustup`. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --- substrate/frame/contracts/fixtures/build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/contracts/fixtures/build.rs b/substrate/frame/contracts/fixtures/build.rs index 8e00bbc9d09..5f174d200b9 100644 --- a/substrate/frame/contracts/fixtures/build.rs +++ b/substrate/frame/contracts/fixtures/build.rs @@ -159,7 +159,7 @@ fn invoke_cargo_fmt<'a>( ) -> Result<()> { // If rustfmt is not installed, skip the check. if !Command::new("rustup") - .args(["run", "nightly", "rustfmt", "--version"]) + .args(["nightly-2023-11-01", "run", "rustfmt", "--version"]) .output() .map_or(false, |o| o.status.success()) { @@ -167,7 +167,7 @@ fn invoke_cargo_fmt<'a>( } let fmt_res = Command::new("rustup") - .args(["run", "nightly", "rustfmt", "--check", "--config-path"]) + .args(["nightly-2023-11-01", "run", "rustfmt", "--check", "--config-path"]) .arg(config_path) .args(files) .output() @@ -182,7 +182,7 @@ fn invoke_cargo_fmt<'a>( eprintln!("{}\n{}", stdout, stderr); eprintln!( "Fixtures files are not formatted.\n - Please run `rustup run nightly rustfmt --config-path {} {}/*.rs`", + Please run `rustup nightly-2023-11-01 run rustfmt --config-path {} {}/*.rs`", config_path.display(), contract_dir.display() ); -- GitLab