forked from heavy-duty/box
host/teardown-host.sh had no `[ -t 0 ]` check before its confirmation prompt. Without --yes/BOX_YES and without a terminal — CI, a pipe, a nohup — it fell into `read`, took the instant EOF and exited 1 saying only "aborted": a refusal naming neither the cause nor the override, in the most destructive script in the tree. It now refuses with the override named, exit 2 — "you invoked this wrong", matching host/revoke-user.sh --purge and install.sh's confirm(), versus 1 for "you were asked and you said no". The gate sits below the --yes/BOX_YES arm, so consent given non-interactively still runs headless, and above the first incus call, so the refusal needs no daemon — which is what lets test/cli.sh drive it for real instead of grepping for it. Refs #113 |
||
|---|---|---|
| .. | ||
| box-firewall.service | ||
| box-firewall.sh | ||
| grant-user.sh | ||
| migrate-host.sh | ||
| revoke-user.sh | ||
| setup-host.sh | ||
| teardown-host.sh | ||