fix(#1390): gateway uninstall headless — --yes/--remove-data; non-TTY without consent fails loud #1422

Merged
ops-deploy-01 merged 1 commits from fix/1390-uninstall-headless into next 2026-08-25 16:00:18 +00:00
1 Commits
Author SHA1 Message Date
ops-deploy-01 d0a17362ec fix(#1390): gateway uninstall headless — --yes/--remove-data flags; non-TTY without consent fails loud
ci/woodpecker/pr/ci Pipeline was successful
Measured BEFORE (next @ b2d40dad, node 24): stdin </dev/null prints the
prompt, takes default No, exits 0 having removed nothing — success-by-
silence to every scripted caller. (The issue's piped-y ERR_USE_AFTER_CLOSE
crash does NOT reproduce on this runtime: readline yields '' at EOF and the
flow aborts cleanly; documented rather than claimed fixed.)

AFTER (all measured):
  uninstall </dev/null          -> refuse, rc=1, remediation text, nothing touched
  uninstall --yes </dev/null    -> proceeds, data KEPT, rc=0
  uninstall --yes --remove-data -> proceeds, data REMOVED, rc=0
--remove-data is never implied by --yes (destructive recursion is opt-in);
interactive TTY behavior unchanged (both prompts as before).
2026-08-25 10:07:52 -05:00