From f2910df0502d152bd50b6477fe1bdf75839ba7af Mon Sep 17 00:00:00 2001 From: Julian lechner Date: Fri, 18 Sep 2026 10:27:45 +0200 Subject: [PATCH] feat(uninstall): accept y/N confirmation in powershell script Co-Authored-By: Claude Sonnet 5 --- scripts/uninstall.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/uninstall.ps1 b/scripts/uninstall.ps1 index a6e9661..237f819 100644 --- a/scripts/uninstall.ps1 +++ b/scripts/uninstall.ps1 @@ -26,9 +26,10 @@ if (-not $DryRun -and -not $Force) { } Write-Host "This removes the managed configuration, extensions, and semantic retrieval setup for $Client under $homePath." Write-Host 'Backups already on disk are kept; anything this setup never installed is left untouched.' - $confirm = [Console]::ReadLine() - if ($null -eq $confirm -or $confirm.Trim().ToLowerInvariant() -ne 'yes') { - Write-Output "Type 'yes' to continue: cancelled, nothing was removed." + $confirm = Read-Host -Prompt 'Continue? [y/N]' + if ($null -eq $confirm) { $confirm = '' } + if ($confirm.Trim().ToLowerInvariant() -notin @('y', 'yes')) { + Write-Output 'Cancelled, nothing was removed.' exit 1 } }