From 80eadd531c7825a45f64dca2dda60cba424350f9 Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:46:26 +0200 Subject: [PATCH] fix: add logging for unrecognized app-removal scope items --- Scripts/GUI/MainWindow-AppSelection.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/GUI/MainWindow-AppSelection.ps1 b/Scripts/GUI/MainWindow-AppSelection.ps1 index 37490f8..e1ff603 100644 --- a/Scripts/GUI/MainWindow-AppSelection.ps1 +++ b/Scripts/GUI/MainWindow-AppSelection.ps1 @@ -233,9 +233,11 @@ function Get-AppRemovalScopeTarget { switch ($selectedItem.Name) { "AppRemovalScopeAllUsers" { return 'AllUsers' } "AppRemovalScopeCurrentUser" { return 'CurrentUser' } + default { + Write-Warning "Unrecognized app-removal scope item '$($selectedItem.Name)'. Defaulting to AllUsers." + return 'AllUsers' + } } - - return $null } function Invoke-AppPreset {