Compare commits

...
3 Commits
Author SHA1 Message Date
Julian lechnerandClaude Sonnet 5 793eee5b61 docs(readme): document y/N uninstall confirmation prompt
CI / linux (push) Successful in 6s
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:27:50 +02:00
Julian lechnerandClaude Sonnet 5 f2910df050 feat(uninstall): accept y/N confirmation in powershell script
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:27:45 +02:00
Julian lechnerandClaude Sonnet 5 cacb3e3bf1 feat(uninstall): accept y/N confirmation in bash script
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:27:41 +02:00
3 changed files with 13 additions and 9 deletions

No files matched your search

+1 -1
View File
@@ -271,7 +271,7 @@ Omitting `-Client`/`--client` opens the same selection prompt as install and upd
if none of the selected destinations are installed (`Not installed, nothing to uninstall.`), unless previewing with
`-DryRun`/`--dry-run`, which always works and never changes anything.
Because this removes configuration rather than adding it, a real run asks for confirmation (type `yes`) before
Because this removes configuration rather than adding it, a real run asks for confirmation (`Continue? [y/N]`) before
touching anything, unless `-Force`/`--force` is passed; running without a terminal attached and without `-Force`/`--force`
fails instead of hanging. Removal reuses the same manifest-sync logic as install and update: every managed file is
backed up under `backups/<timestamp>/` before removal, and a file changed locally since the last install/update is
+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 '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
}
}
+8 -5
View File
@@ -42,11 +42,14 @@ if [ "$dry_run" = false ] && [ "$force" = false ]; then
fi
printf 'This removes the managed configuration, extensions, and semantic retrieval setup for %s under %s.\n' "$client" "$home_path"
printf 'Backups already on disk are kept; anything this setup never installed is left untouched.\n'
read -r -p "Type 'yes' to continue: " confirm || confirm=""
if [ "$confirm" != yes ]; then
printf 'Cancelled, nothing was removed.\n'
exit 1
fi
read -r -p "Continue? [y/N]: " confirm || confirm=""
case "$confirm" in
[Yy]|[Yy][Ee][Ss]) ;;
*)
printf 'Cancelled, nothing was removed.\n'
exit 1
;;
esac
fi
stamp=$(date +%Y%m%d-%H%M%S)