Skip to content

Commit 92d3ac6

Browse files
authored
Merge pull request #1133 from SteveL-MSFT/clippy
Explicitly install clippy
2 parents 5325e53 + ebe1bb9 commit 92d3ac6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

build.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,24 @@ if ($null -ne $packageType) {
236236
& $rustup default stable
237237
}
238238

239+
if ($Clippy) {
240+
Write-Verbose -Verbose "Installing clippy..."
241+
if ($UseCFS) {
242+
cargo install clippy --config .cargo/config.toml
243+
} else {
244+
if ($architecture -ne 'current') {
245+
write-verbose -verbose "Installing clippy for $architecture"
246+
& $rustup component add clippy --target $architecture
247+
} else {
248+
write-verbose -verbose "Installing clippy for current architecture"
249+
& $rustup component add clippy
250+
}
251+
}
252+
if ($LASTEXITCODE -ne 0) {
253+
throw "Failed to install clippy"
254+
}
255+
}
256+
239257
## Test if Node is installed
240258
## Skipping upgrade as users may have a specific version they want to use
241259
if (!(Get-Command 'node' -ErrorAction Ignore)) {

0 commit comments

Comments
 (0)