feat(uninstall): accept y/N confirmation in bash 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:41 +02:00
1 parent ec81d8db9b
commit cacb3e3bf1
1 file changed
+8 -5
+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)