fix(uninstall): remove interactive confirmation for --purge-data

The read prompt reads EOF when invoked via curl pipe, causing an
immediate abort. The --purge-data flag is explicit enough to serve
as confirmation — no secondary prompt needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
amir-climy 2026-05-19 19:54:40 +08:00
parent 8ed781a6c1
commit d67086ccd8

View file

@ -48,8 +48,6 @@ podman rmi "$IMAGE" 2>/dev/null || docker rmi "$IMAGE" 2>/dev/null || true
if [[ $PURGE -eq 1 ]]; then if [[ $PURGE -eq 1 ]]; then
info "DESTRUCTIVE: removing manage server volumes..." info "DESTRUCTIVE: removing manage server volumes..."
info " this deletes: scan history, hosts, users, worker binaries" info " this deletes: scan history, hosts, users, worker binaries"
read -r -p " Are you sure? Type 'yes' to confirm: " CONFIRM
[[ "$CONFIRM" == "yes" ]] || die "aborted"
for vol in triton-manage-db-data triton-manage-bins; do for vol in triton-manage-db-data triton-manage-bins; do
podman volume rm -f "$vol" 2>/dev/null \ podman volume rm -f "$vol" 2>/dev/null \
|| docker volume rm -f "$vol" 2>/dev/null \ || docker volume rm -f "$vol" 2>/dev/null \