Skip to content

fix(cli): gracefully handle non-TTY stdin in raw_input_char - #641

Open
Deeven-Seru wants to merge 3 commits into
canonical:mainfrom
Deeven-Seru:fix-apport-cli-termios-crash
Open

fix(cli): gracefully handle non-TTY stdin in raw_input_char#641
Deeven-Seru wants to merge 3 commits into
canonical:mainfrom
Deeven-Seru:fix-apport-cli-termios-crash

Conversation

@Deeven-Seru

Copy link
Copy Markdown

When apport-cli is run in an environment where stdin is not a terminal (e.g., redirected input or background jobs), it crashed with an unhandled termios.error when trying to pause for input. This patch checks os.isatty() and reads normally if not a TTY.

When apport-cli is run in an environment where stdin is not a terminal (e.g., redirected or background jobs), it crashed with an unhandled termios.error when trying to pause for input. This patch checks os.isatty() and reads normally if not a TTY.
Copilot AI review requested due to automatic review settings July 27, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.50%. Comparing base (d9d3c9f) to head (722bebd).

Files with missing lines Patch % Lines
bin/apport-cli 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
+ Coverage   84.47%   84.50%   +0.03%     
==========================================
  Files         106      106              
  Lines       21053    21083      +30     
  Branches     3223     3233      +10     
==========================================
+ Hits        17784    17816      +32     
+ Misses       2792     2788       -4     
- Partials      477      479       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants