Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
sign installer pre-exec checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mriedmann committed Feb 16, 2022
1 parent 0047767 commit 440c950
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions msi/SignInstaller.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$ValidationErrors = @()
if (-not (Test-Path env:PFX_THUMBPRINT)) { $ValidationErrors += @("PFX_THUMBPRINT envvar not set") }
if (-not (Test-Path env:PFX_PASSPHRASE)) { $ValidationErrors += @("PFX_PASSPHRASE envvar not set") }
if (-not (Test-Path env:PFX_THUMBPRINT) -or (-not $env:PFX_THUMBPRINT)) { $ValidationErrors += @("PFX_THUMBPRINT envvar not set") }
if (-not (Test-Path env:PFX_PASSPHRASE) -or (-not $env:PFX_THUMBPRINT)) { $ValidationErrors += @("PFX_PASSPHRASE envvar not set") }
if ($ValidationErrors.Count -gt 0) {
Write-Warning "Validation Failed!`n$($ValidationErrors -join "`n")"
exit 0
Write-Warning "`n$($ValidationErrors -join "`n")"
throw "Env-Vars not set!"
}

$msbuild = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
Expand Down

0 comments on commit 440c950

Please sign in to comment.