Improve error reporting & handling (#741)

This commit is contained in:
Jeffrey
2026-08-24 20:34:50 +02:00
committed by GitHub
parent fff1fcd0b2
commit ef8811d28d
27 changed files with 1426 additions and 450 deletions
+7 -5
View File
@@ -670,13 +670,15 @@ function Show-MainWindow {
if ($selectedApps.Count -gt 0) {
if (-not (Confirm-UnsafeAppRemoval -SelectedApps $selectedApps -Owner $window)) { return }
$scopeTarget = Get-AppRemovalScopeTarget -AppRemovalScopeCombo $appRemovalScopeCombo -OtherUsernameTextBox $otherUsernameTextBox
if ([string]::IsNullOrWhiteSpace($scopeTarget)) {
Write-Warning 'App removal was cancelled because the selected removal scope is invalid.'
return
}
Add-Parameter 'RemoveApps'
Add-Parameter 'Apps' ($selectedApps -join ',')
$scopeTarget = Get-AppRemovalScopeTarget -AppRemovalScopeCombo $appRemovalScopeCombo -OtherUsernameTextBox $otherUsernameTextBox
if ($scopeTarget) {
Add-Parameter 'AppRemovalTarget' $scopeTarget
}
Add-Parameter 'AppRemovalTarget' $scopeTarget
}
# Apply dynamic tweaks