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:
@@ -39,7 +39,7 @@ function Show-CliDefaultModeOptions {
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to load settings from DefaultSettings.json file: $_"
|
||||
Wait-ForKeyPress
|
||||
Wait-ForKeyPress -ExitCode 1
|
||||
}
|
||||
|
||||
Save-Settings
|
||||
@@ -51,4 +51,4 @@ function Show-CliDefaultModeOptions {
|
||||
|
||||
Write-PendingChanges
|
||||
Write-CliHeader 'Default Mode'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ function Show-CliLastUsedSettings {
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to load settings from LastUsedSettings.json file: $_"
|
||||
Wait-ForKeyPress
|
||||
Wait-ForKeyPress -ExitCode 1
|
||||
}
|
||||
|
||||
if ($Silent) {
|
||||
@@ -17,4 +17,4 @@ function Show-CliLastUsedSettings {
|
||||
|
||||
Write-PendingChanges
|
||||
Write-CliHeader 'Custom Mode'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Waits for user acknowledgement, then exits the script.
|
||||
|
||||
.PARAMETER ExitCode
|
||||
Process exit code to return after acknowledgement. Defaults to 0.
|
||||
#>
|
||||
function Wait-ForKeyPress {
|
||||
param(
|
||||
[int]$ExitCode = 0
|
||||
)
|
||||
|
||||
# Suppress prompt if Silent parameter was passed
|
||||
if (-not $Silent) {
|
||||
Write-Output ""
|
||||
@@ -7,5 +18,5 @@ function Wait-ForKeyPress {
|
||||
}
|
||||
|
||||
Stop-Transcript
|
||||
Exit
|
||||
Exit $ExitCode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user