Description
zeph project purge without --dry-run or -y crashes with Error: IO error: not a terminal when stdin is not a TTY (pipe, CI, script context). The user receives no guidance on how to proceed.
Reproduction Steps
echo '' | cargo run --features full -- --config .local/config/testing.toml project purge
Expected Behavior
A clear message: e.g. Aborted: stdin is not a terminal. Use --dry-run to preview or -y to confirm non-interactively. with exit code 1.
Actual Behavior
Error: IO error: not a terminal
The error originates from dialoguer::Confirm::interact() which does not handle non-TTY stdin gracefully. The handler in src/commands/project.rs:230 propagates the error via ? with no user-friendly message.
Environment
- Version: 0.20.1 (a030b2a)
- Config: .local/config/testing.toml
- Features: full
Logs / Evidence
printf '' | cargo run --features full -- --config .local/config/testing.toml project purge
Error: IO error: not a terminal
Suggested Fix
Catch the not a terminal error from dialoguer and return a user-facing message explaining that -y or --dry-run must be used in non-interactive contexts.
Description
zeph project purgewithout--dry-runor-ycrashes withError: IO error: not a terminalwhen stdin is not a TTY (pipe, CI, script context). The user receives no guidance on how to proceed.Reproduction Steps
Expected Behavior
A clear message: e.g.
Aborted: stdin is not a terminal. Use --dry-run to preview or -y to confirm non-interactively.with exit code 1.Actual Behavior
The error originates from
dialoguer::Confirm::interact()which does not handle non-TTY stdin gracefully. The handler insrc/commands/project.rs:230propagates the error via?with no user-friendly message.Environment
Logs / Evidence
Suggested Fix
Catch the
not a terminalerror fromdialoguerand return a user-facing message explaining that-yor--dry-runmust be used in non-interactive contexts.