Uh oh!
There was an error while loading. Please reload this page.
fix(plugin): prevent spinner garbage output in non-TTY environments - #31529
fix(plugin): prevent spinner garbage output in non-TTY environments#31529MD-Mushfiqur123 wants to merge 1 commit into
Conversation
The following comment was made by an LLM, it may be inaccurate: Potential duplicate PRs found:
All three PRs are addressing variations of the same core problem: spinner animation garbage output in non-TTY environments. You may want to check if these are already merged/closed or if there's overlap with the current PR #31529. |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Backport of anomalyco#31529 (by @MD-Mushfiqur123). Suppresses spinner control sequences when stdout is not a TTY (pipes/CI), which otherwise splatter escape junk into captured output. Co-Authored-By: Claude Mythos 5 <noreply@anthropic.com>
Signed-off-by: god032396-del <god032396@gmail.com>
521ab96 to
a6ddc4bCompare
Issue for this PR
Closes#27908
Type of change
What does this PR do?
When running
opencode plugin installfrom non-interactive shells (PowerShell, CI/CD), the spinner animation outputs garbage — each frame (◓, ◑, ◒, ◐) appears on a new line because carriage returns are not interpreted in non-TTY environments.The fix adds a
createNonTTYSpinner()function that outputs plain text (msg.../msg done) instead of animated escape sequences when stdout is not a TTY.How did you verify your code works?
npx tsc --noEmitpasses with no errorsprocess.stdout.isTTYchecks in the codebase (seepackages/opencode/src/cli/ui.ts:49)Checklist