Skip to content

fix(cli): return user-friendly error when project purge stdin is not a terminal#3600

Merged
bug-ops merged 1 commit intomainfrom
3599-project-purge-non-tty
May 5, 2026
Merged

fix(cli): return user-friendly error when project purge stdin is not a terminal#3600
bug-ops merged 1 commit intomainfrom
3599-project-purge-non-tty

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 5, 2026

Summary

  • zeph project purge without --dry-run or -y previously crashed with Error: IO error: not a terminal when stdin is not a TTY (pipe, CI, script context)
  • The raw dialoguer IO error is now caught and replaced with an actionable message: Aborted: stdin is not a terminal. Use --dry-run to preview or -y to confirm non-interactively.
  • Exit code is 1 (error), which is correct for an aborted non-interactive invocation

Test plan

  • echo '' | cargo run --features full -- --config .local/config/testing.toml project purge — should print the new message and exit with code 1, not IO error: not a terminal
  • cargo run --features full -- --config .local/config/testing.toml project purge --dry-run — should still work normally
  • cargo run --features full -- --config .local/config/testing.toml project purge -y — should still work normally
  • Interactive terminal invocation — confirm prompt still works as before

Closes #3599

…a terminal

Catch the dialoguer "not a terminal" IO error in the interactive confirmation
path of `zeph project purge` and return an actionable message directing the
user to --dry-run or -y for non-interactive contexts. Closes #3599
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation size/S Small PR (11-50 lines) and removed bug Something isn't working labels May 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 5, 2026 15:37
@bug-ops bug-ops merged commit 5613406 into main May 5, 2026
32 checks passed
@bug-ops bug-ops deleted the 3599-project-purge-non-tty branch May 5, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

project purge: unhelpful error when stdin is not a terminal

1 participant