Skip to content

fix: preserve script output lacking a final newline#9171

Open
priyanshurav wants to merge 1 commit intonpm:latestfrom
priyanshurav:fix/npm-output-newline-bug
Open

fix: preserve script output lacking a final newline#9171
priyanshurav wants to merge 1 commit intonpm:latestfrom
priyanshurav:fix/npm-output-newline-bug

Conversation

@priyanshurav
Copy link
Copy Markdown

@priyanshurav priyanshurav commented Mar 31, 2026

Note: This is a re-submission of #8696. The bug remains unresolved on the current latest branch and still requires this fix.

Problem

If the script output did not end with a newline, then the last line that was printed to the console would get deleted,
This was due to the #clearSpinner method in Progress class deleting an entire line, just to erase the spinner.

Solution

Used control characters to only erase the single spinner character and not the entire line.

References

Fixes #8583

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.

[BUG] npm run erases script output after the final newline

1 participant