Skip to content

Commit 106d473

Browse files
committed
add error check
1 parent 677ba85 commit 106d473

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,16 @@ if ($packageType -eq 'msixbundle') {
571571
$packageName = "DSC-$productVersion-$architecture.tar"
572572
$tarFile = Join-Path $PSScriptRoot 'bin' $packageName
573573
tar cvf $tarFile -C $tgzTarget .
574+
if ($LASTEXITCODE -ne 0) {
575+
throw "Failed to create tar file"
576+
}
574577
Write-Host -ForegroundColor Green "`nTar file is created at $tarFile"
575578

576579
$gzFile = "$tarFile.gz"
577580
gzip -c $tarFile > $gzFile
581+
if ($LASTEXITCODE -ne 0) {
582+
throw "Failed to create gz file"
583+
}
578584
Write-Host -ForegroundColor Green "`nGz file is created at $gzFile"
579585
}
580586

0 commit comments

Comments
 (0)