Skip to content

Commit fd076a1

Browse files
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)SteveL-MSFT
authored andcommitted
install clippy if needed
1 parent 2edcc4b commit fd076a1

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
@@ -341,6 +341,18 @@ if (!$SkipBuild) {
341341
& $rustup target add --toolchain $channel $architecture
342342
}
343343

344+
if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) {
345+
Write-Verbose -Verbose "Installing cargo-clippy"
346+
if ($UseCFS) {
347+
cargo install clippy --config .cargo/config.toml
348+
} else {
349+
cargo install clippy
350+
}
351+
if ($LASTEXITCODE -ne 0) {
352+
throw "Failed to install cargo-clippy"
353+
}
354+
}
355+
344356
if (Test-Path $target) {
345357
Remove-Item $target -Recurse -ErrorAction Ignore
346358
}

0 commit comments

Comments
 (0)