Skip to content

Backport: fix(cmd): respect SetStdin/SetStdout/SetStderr for tea.Exec compatibility#524

Open
puneet-chandna wants to merge 1 commit intocharmbracelet:v2-expfrom
puneet-chandna:v2-exp
Open

Backport: fix(cmd): respect SetStdin/SetStdout/SetStderr for tea.Exec compatibility#524
puneet-chandna wants to merge 1 commit intocharmbracelet:v2-expfrom
puneet-chandna:v2-exp

Conversation

@puneet-chandna
Copy link

This PR backports the changes from #522 to the v2-exp branch.

It updates wish.Cmd process spawning to use the internal x/xpty library and ensures SetStdin/SetStdout/SetStderr are respected for tea.Exec compatibility.

Fixes #506

- Use xpty.WaitProcess on Windows for proper ConPTY waiting
- Implement SetStdin/SetStdout/SetStderr to store and use custom I/O
- Require all stdio to be set for custom path (avoids PTY deadlocks)

Fixes charmbracelet#506
@puneet-chandna puneet-chandna requested a review from a team as a code owner January 14, 2026 15:39
@puneet-chandna puneet-chandna requested review from aymanbagabas and kujtimiihoxha and removed request for a team January 14, 2026 15:39
@aymanbagabas aymanbagabas requested a review from caarlos0 January 14, 2026 16:15
@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v2-exp@6cd7463). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             v2-exp     #524   +/-   ##
=========================================
  Coverage          ?   75.13%           
=========================================
  Files             ?       21           
  Lines             ?      893           
  Branches          ?        0           
=========================================
  Hits              ?      671           
  Misses            ?      167           
  Partials          ?       55           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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