mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
[Windows] Apply code style rules to Windows scripts (#8957)
* Apply code style rules to Windows scripts * Fix typo * Fix configure-toolset script * Fix parameters in Msys2 installation script * Improve log readability * Remove broken exit code validation
This commit is contained in:
committed by
GitHub
parent
76d6f0f574
commit
7fe65a2204
@@ -19,6 +19,9 @@ Test-FileChecksum $rustupPath -ExpectedSHA256Sum $distributorFileHash
|
||||
|
||||
# Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y)
|
||||
& $rustupPath -y --default-toolchain=stable --profile=minimal
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Rust installation failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
# Add %USERPROFILE%\.cargo\bin to USER PATH
|
||||
Add-DefaultPathItem "%USERPROFILE%\.cargo\bin"
|
||||
@@ -33,7 +36,14 @@ rustup target add x86_64-pc-windows-gnu
|
||||
|
||||
# Install common tools
|
||||
rustup component add rustfmt clippy
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Rust component installation failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
cargo install --locked bindgen-cli cbindgen cargo-audit cargo-outdated
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Rust tools installation failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
# Cleanup Cargo crates cache
|
||||
Remove-Item "${env:CARGO_HOME}\registry\*" -Recurse -Force
|
||||
|
||||
Reference in New Issue
Block a user