Skip to content

fix: suppress stty stderr leak in CLI::generateDimensions() when stdin is not a TTY#10124

Merged
paulbalandan merged 1 commit intocodeigniter4:developfrom
paulbalandan:fix-stty-error
Apr 21, 2026
Merged

fix: suppress stty stderr leak in CLI::generateDimensions() when stdin is not a TTY#10124
paulbalandan merged 1 commit intocodeigniter4:developfrom
paulbalandan:fix-stty-error

Conversation

@paulbalandan
Copy link
Copy Markdown
Member

Description
When stdin isn't a TTY (PHPUnit, CI, piped output), stty writes Inappropriate ioctl for device to stderr — PHP's exec() only captures stdout, so that message leaked to the console. Redirecting stderr fixes it without affecting the fallback logic, since exec() still returns empty stdout and falls through to tput.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 20, 2026
@paulbalandan paulbalandan merged commit 279eae2 into codeigniter4:develop Apr 21, 2026
60 of 61 checks passed
@paulbalandan paulbalandan deleted the fix-stty-error branch April 21, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants