Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tput terminal size detection #4011

Merged
merged 6 commits into from
Nov 23, 2024
Merged

Fix tput terminal size detection #4011

merged 6 commits into from
Nov 23, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Nov 23, 2024

We previously captured the error stream to prevent errors from showing up when tput does not exist, but that causes issues with tput not having a stream to get dimensions from, resulting in it always returning 80x24 terminal dimensions regardless of the size of the user terminal.

Instead, we can check up front whether tput works with stderr redirected, and if it works, we then proceed to continue using tput with stderr inherited. That ensures error messages are not shown while still giving tput the stderr stream to work with

@lihaoyi lihaoyi marked this pull request as ready for review November 23, 2024 03:50
@lihaoyi lihaoyi merged commit 12c666e into com-lihaoyi:main Nov 23, 2024
26 of 27 checks passed
@lefou lefou added this to the 0.12.3 milestone Nov 23, 2024
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