Fix Windows SignPath PSGallery preflight (#7135)

* Verify Windows app executable signing

* Isolate Windows signing verifier tests

* Handle direct Windows installer extraction

* Fix SignPath PowerShell gallery preflight

---------

Co-authored-by: Neil <neil@stably.ai>
This commit is contained in:
Brennan Benson
2026-07-02 11:42:44 -07:00
committed by GitHub
co-authored by Neil
parent 4c03924618
commit fc17c57b6b
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -889,6 +889,11 @@ jobs:
if: matrix.platform == 'win'
shell: pwsh
run: |
# Why: Some hosted Windows images start without PSGallery registered.
if ($null -eq (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default -InstallationPolicy Trusted
}
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
$trimChars = [char[]]@([System.IO.Path]::DirectorySeparatorChar, [System.IO.Path]::AltDirectorySeparatorChar)
@@ -194,6 +194,10 @@ describe('Electron runtime package contract', () => {
expect(installStep.if).toBe("matrix.platform == 'win'")
expect(installStep.shell).toBe('pwsh')
expect(installRun).toContain(
'if ($null -eq (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue))'
)
expect(installRun).toContain('Register-PSRepository -Default -InstallationPolicy Trusted')
expect(installRun).toContain('Set-PSRepository -Name PSGallery -InstallationPolicy Trusted')
expect(installRun).toMatch(/\$env:PSModulePath -split \[System\.IO\.Path\]::PathSeparator/)
expect(installRun).toContain(