Skip to content

Commit 390bdd6

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
fail if dependencies don't get installed
1 parent 654be48 commit 390bdd6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ if ($null -ne $packageType) {
185185
$env:PATH += ";$env:USERPROFILE\.cargo\bin"
186186
Remove-Item temp:/rustup-init.exe -ErrorAction Ignore
187187
}
188+
if ($LASTEXITCODE -ne 0) {
189+
throw "Failed to install Rust"
190+
}
188191
}
189192
elseif (!$usingADO) {
190193
Write-Verbose -Verbose "Rust found, updating..."
@@ -218,12 +221,18 @@ if ($null -ne $packageType) {
218221
Write-Warning "winget not found, please install Node.js manually"
219222
}
220223
}
224+
if ($LASTEXITCODE -ne 0) {
225+
throw "Failed to install Node.js"
226+
}
221227
}
222228

223229
## Test if tree-sitter is installed
224230
if ($null -eq (Get-Command tree-sitter -ErrorAction Ignore)) {
225231
Write-Verbose -Verbose "tree-sitter not found, installing..."
226232
cargo install tree-sitter-cli --config .cargo/config.toml
233+
if ($LASTEXITCODE -ne 0) {
234+
throw "Failed to install tree-sitter-cli"
235+
}
227236
}
228237
}
229238

0 commit comments

Comments
 (0)