fix(test): start exited process portably in lock test
CI / CI configuration security checks (push) Successful in 4s
CI / Capabilities and shell quality (push) Successful in 15s
CI / Python tests and compilation (push) Successful in 19s
CI / Build and inspect generated packages (push) Successful in 16s
CI / PowerShell tests on Ubuntu (push) Successful in 1m6s
CI / Installed client configuration smoke tests (push) Successful in 44s
CI / Bash integration and installation guards (push) Successful in 1m4s
CI / Qwen retrieval integration (push) Successful in 14m22s

Start-Process -WindowStyle is unavailable in PowerShell on Linux, which broke
the CI PowerShell job. Use ProcessStartInfo with CreateNoWindow instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Opus 5.5 committed 2026-10-01 12:49:04 +02:00
1 parent b51e6a4211
commit 83e921301b
1 file changed
+4 -1
+4 -1
View File
@@ -129,7 +129,10 @@ try {
try { $null = Sync-ManagedDestination -Source $source -Destination $destination -Stamp 'locked' } catch { $blocked = $_.Exception.Message -like 'Another installation or update holds*' }
if (-not $blocked) { throw 'A held destination lock must block a parallel sync.' }
if ([System.IO.File]::ReadAllText((Get-ManagedManifestPath $destination)) -ne $manifestBefore) { throw 'A blocked sync must not write the manifest.' }
$exited = Start-Process -FilePath (Get-Process -Id $PID).Path -ArgumentList '-NoProfile', '-Command', 'exit 0' -PassThru -WindowStyle Hidden
$exitedStart = New-Object System.Diagnostics.ProcessStartInfo((Get-Process -Id $PID).Path, '-NoProfile -Command exit 0')
$exitedStart.UseShellExecute = $false
$exitedStart.CreateNoWindow = $true
$exited = [System.Diagnostics.Process]::Start($exitedStart)
$exited.WaitForExit()
[System.IO.File]::WriteAllText($lockPath, "powershell $([Environment]::MachineName) $($exited.Id)`n")
$null = Sync-ManagedDestination -Source $source -Destination $destination -Stamp 'stale-lock'