Skip to content

Commit 074f84c

Browse files
committed
Explicitly install clippy
1 parent 5325e53 commit 074f84c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ if (!$SkipBuild) {
323323
& $rustup target add --toolchain $channel $architecture
324324
}
325325

326+
if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) {
327+
Write-Verbose -Verbose "clippy not found, installing..."
328+
if ($UseCFS) {
329+
cargo install clippy --config .cargo/config.toml
330+
} else {
331+
rustup component add clippy
332+
}
333+
if ($LASTEXITCODE -ne 0) {
334+
throw "Failed to install clippy"
335+
}
336+
}
337+
326338
if (Test-Path $target) {
327339
Remove-Item $target -Recurse -ErrorAction Ignore
328340
}

0 commit comments

Comments
 (0)