Skip to content

Exit with error when stdin is not a terminal#131

Merged
shellicar merged 4 commits intomainfrom
fix/empty-piped-stdin
Mar 27, 2026
Merged

Exit with error when stdin is not a terminal#131
shellicar merged 4 commits intomainfrom
fix/empty-piped-stdin

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

  • Detect non-TTY stdin at startup and exit immediately
  • Prevents the CLI hanging when piped empty stdin

Related Issues

Closes #107

@shellicar shellicar added this to the 1.0 milestone Mar 27, 2026
@shellicar shellicar added the bug Something isn't working label Mar 27, 2026
@shellicar shellicar self-assigned this Mar 27, 2026
@shellicar shellicar added the bug Something isn't working label Mar 27, 2026
@shellicar shellicar requested a review from bananabot9000 March 27, 2026 04:41
@shellicar shellicar enabled auto-merge (squash) March 27, 2026 04:41
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Fail-fast TTY check at the right spot (after config, before CLI init). stderr for the error message is correct.

auto-merge was automatically disabled March 27, 2026 05:06

Pull Request is not mergeable

@shellicar shellicar merged commit 76ff0fb into main Mar 27, 2026
3 checks passed
@shellicar shellicar deleted the fix/empty-piped-stdin branch March 27, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect empty piped stdin and abort gracefully

2 participants