ci(windows-e2e): stderr chatter is not failure - EAP=Continue around native calls

First real run of windows-installer-script-e2e.ps1 died on
'Cloning into ...': git clone writes progress to stderr, and under
EAP=Stop the outer PowerShell wraps a child's stderr into a
terminating NativeCommandError. Drop to EAP=Continue around every
native invocation that redirects with *> (install.ps1 run, hermes
--version, hermes update) and judge by exit code alone - the same
prevEap pattern the GUI driver already uses.
This commit is contained in:
ethernet
2026-08-11 22:52:38 -04:00
parent ae3a822d4e
commit dc23cbbb9b
+14 -3
View File
@@ -127,10 +127,16 @@ function Invoke-Installer {
$text = Get-Content -LiteralPath $script -Raw
if ($text -match '\$NonInteractive') { $flags += "-NonInteractive" }
$log = Join-Path $LogDir "install-$Label.log"
# Native stderr (git clone progress, pip notices) must not become
# terminating NativeCommandErrors under EAP=Stop; the exit code is the
# verdict here, not stderr chatter.
$prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
& powershell -NoProfile -ExecutionPolicy Bypass -File $script @flags *> $log
if ($LASTEXITCODE -ne 0) {
$installExit = $LASTEXITCODE
$ErrorActionPreference = $prevEap
if ($installExit -ne 0) {
Get-Content -LiteralPath $log -Tail 50 | Write-Host
Fail "install.ps1 ($Label) exited $LASTEXITCODE; full log in $log"
Fail "install.ps1 ($Label) exited $installExit; full log in $log"
}
}
@@ -142,8 +148,11 @@ function Assert-Checkout {
$hermes = Join-Path $InstallDir "venv\Scripts\hermes.exe"
if (-not (Test-Path -LiteralPath $hermes)) { Fail "no hermes console script at $hermes" }
$verLog = Join-Path $LogDir "version-$Label.log"
$prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
& $hermes --version *> $verLog
if ($LASTEXITCODE -ne 0) {
$verExit = $LASTEXITCODE
$ErrorActionPreference = $prevEap
if ($verExit -ne 0) {
Get-Content -LiteralPath $verLog | Write-Host
Fail "hermes --version failed after $Label; log in $verLog"
}
@@ -169,6 +178,7 @@ switch ($UpdateMethod) {
# `--yes` reaches the update subcommand only in later releases, and
# argparse rejects the whole invocation when it does not exist.
$updateArgs = @("update")
$prevEap = $ErrorActionPreference; $ErrorActionPreference = "Continue"
$helpText = & $hermes update --help 2>&1 | Out-String
if ($helpText -match '--yes') { $updateArgs += "--yes" }
$log = Join-Path $LogDir "update.log"
@@ -178,6 +188,7 @@ switch ($UpdateMethod) {
$updateExit = $LASTEXITCODE
} finally {
Pop-Location
$ErrorActionPreference = $prevEap
}
if ($updateExit -ne 0) {
Get-Content -LiteralPath $log -Tail 50 | Write-Host