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>
This commit is contained in:
Oliver Tale-Yazdi
2024-01-19 17:12:30 +01:00
committed by GitHub
parent 50a2e28b00
commit 2e9b4405ed
+3 -3
View File
@@ -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()
);