Enhance app removal verification and error reporting (#735)

This commit is contained in:
Jeffrey
2026-08-12 15:56:29 +02:00
committed by GitHub
parent 9505a5a374
commit d1338cd027
16 changed files with 328 additions and 179 deletions
+10
View File
@@ -8,4 +8,14 @@ Describe 'Wait-ForKeyPress' {
$LASTEXITCODE | Should -Be 0
}
It 'uses the requested exit code' {
$scriptPath = Join-Path $PSScriptRoot '..\Scripts\CLI\Wait-ForKeyPress.ps1'
$command = "function Stop-Transcript {}; `$global:Silent = `$true; . '$scriptPath'; Wait-ForKeyPress -ExitCode 1"
$encodedCommand = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($command))
& powershell.exe -NoProfile -EncodedCommand $encodedCommand
$LASTEXITCODE | Should -Be 1
}
}