fix(installer): pass test signer switch safely (#924)

This commit is contained in:
小莫 authored and GitHub committed 2026-10-13 21:31:53 +09:00
1 parent 93933602ff
commit fbe64a7ab2
1 file changed
+2 -2
+2 -2
View File
@@ -11,7 +11,7 @@ param(
[Parameter(Mandatory)][string]$Directory,
[string]$Version,
[string]$ExpectedSignerThumbprint,
[switch]$AllowUntrustedSigner
[string]$AllowUntrustedSigner
)
$ErrorActionPreference = 'Stop'
@@ -61,7 +61,7 @@ else {
$signed = Join-Path $Directory $file
if (-not (Test-Path -LiteralPath $signed)) { throw "SignPath returned no $file" }
$signature = Get-AuthenticodeSignature -LiteralPath $signed
if ($signature.Status -ne 'Valid' -and -not $AllowUntrustedSigner) {
if ($signature.Status -ne 'Valid' -and $AllowUntrustedSigner -ne 'true') {
throw "SignPath returned $file with signature status $($signature.Status)"
}
if (-not $signature.SignerCertificate) {