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: override stdout rows to prevent terminal clearing #27

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Oct 17, 2024

Prevent prior output from being cleared

ink clears the terminal when the height of the output exceeds the height of the terminal. This means that any output in the terminal prior to the rendering of the table is removed. So to prevent this, we override the number of rows on the stdout stream so that the height of the terminal is always greater than the height of the table.

This should be fine since the table is only rendered once.

Windows tests run by wireit

For some unknown reason using our wrapper stream on windows is problematic when tests are run by wireit. To avoid this, we detect this situation and use process.stdout instead

@mdonnalley mdonnalley added the bug Something isn't working label Oct 18, 2024
Copy link

git2gus bot commented Oct 18, 2024

This issue has been linked to a new work item: W-17014933

@WillieRuemmele
Copy link
Contributor

QA Notes


✅ : now able to see CLI history
✅ : no errant %

@WillieRuemmele WillieRuemmele merged commit b1927b5 into main Oct 21, 2024
11 checks passed
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.

2 participants