mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-08-23 08:02:07 +00:00
Enhance app removal verification and error reporting (#735)
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user