feat(uninstall): accept y/N confirmation in powershell script

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Julian lechnerandClaude Sonnet 5 committed 2026-09-18 10:27:45 +02:00
1 parent cacb3e3bf1
commit f2910df050
1 file changed
+4 -3
+4 -3
View File
@@ -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 "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.' Write-Host 'Backups already on disk are kept; anything this setup never installed is left untouched.'
$confirm = [Console]::ReadLine() $confirm = Read-Host -Prompt 'Continue? [y/N]'
if ($null -eq $confirm -or $confirm.Trim().ToLowerInvariant() -ne 'yes') { if ($null -eq $confirm) { $confirm = '' }
Write-Output "Type 'yes' to continue: cancelled, nothing was removed." if ($confirm.Trim().ToLowerInvariant() -notin @('y', 'yes')) {
Write-Output 'Cancelled, nothing was removed.'
exit 1 exit 1
} }
} }