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
+2 -2
View File
@@ -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'
}
}
+2 -2
View File
@@ -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'
}
}
+12 -1
View File
@@ -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
}