Skip to content

Commit eb0beda

Browse files
committed
change location of detecting clippy
1 parent 074f84c commit eb0beda

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

build.ps1

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

239+
if ($Clippy -and $null -eq (Get-Command cargo-clippy -ErrorAction Ignore)) {
240+
Write-Verbose -Verbose "clippy not found, installing..."
241+
if ($UseCFS) {
242+
cargo install clippy --config .cargo/config.toml
243+
} else {
244+
cargo install clippy
245+
}
246+
if ($LASTEXITCODE -ne 0) {
247+
throw "Failed to install clippy"
248+
}
249+
}
250+
239251
## Test if Node is installed
240252
## Skipping upgrade as users may have a specific version they want to use
241253
if (!(Get-Command 'node' -ErrorAction Ignore)) {
@@ -323,18 +335,6 @@ if (!$SkipBuild) {
323335
& $rustup target add --toolchain $channel $architecture
324336
}
325337

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-
338338
if (Test-Path $target) {
339339
Remove-Item $target -Recurse -ErrorAction Ignore
340340
}

0 commit comments

Comments
 (0)