diff --git a/build.ps1 b/build.ps1 index d681bf94c..6c238faed 100755 --- a/build.ps1 +++ b/build.ps1 @@ -236,6 +236,24 @@ if ($null -ne $packageType) { & $rustup default stable } + if ($Clippy) { + Write-Verbose -Verbose "Installing clippy..." + if ($UseCFS) { + cargo install clippy --config .cargo/config.toml + } else { + if ($architecture -ne 'current') { + write-verbose -verbose "Installing clippy for $architecture" + & $rustup component add clippy --target $architecture + } else { + write-verbose -verbose "Installing clippy for current architecture" + & $rustup component add clippy + } + } + if ($LASTEXITCODE -ne 0) { + throw "Failed to install clippy" + } + } + ## Test if Node is installed ## Skipping upgrade as users may have a specific version they want to use if (!(Get-Command 'node' -ErrorAction Ignore)) {