Skip to content

Conversation

jagregory
Copy link
Contributor

Spinners with RawOutput enabled print lots of blank characters to logs, because the spinners are always calling sClearLine. Additionally, spinners without any text print several blank newlines to logs.

e.g.

^M                                                                                ^MDoing something
^M                                                                                ^MSUCCESS: Doing something

This PR suppresses line clearing when RawOutput is true, and only writes to the output if there's any text to write.

Copy link
Member

@MarvinJWendt MarvinJWendt left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for contributing 🚀

I refactored the PR a little :)

Copy link
Member

@floaust floaust left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you.

@MarvinJWendt MarvinJWendt enabled auto-merge (squash) June 6, 2025 18:59
@MarvinJWendt MarvinJWendt merged commit 0d3895d into pterm:master Jun 6, 2025
2 checks passed
@MarvinJWendt MarvinJWendt changed the title Suppress spinner line clearing in raw output mode fix(spinner): suppress spinner line clearing in raw output mode Jun 6, 2025
@github-actions github-actions bot added the fix label Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants