Skip to content

Conversation

@cmilesdev
Copy link
Member

@cmilesdev cmilesdev commented Jan 9, 2026

  • Added WithPTY() to run commands on a PTY so tools still detect a TTY while OnStdout/OnStderr callbacks are used; output is combined in PTY mode.
  • Preserved TTY passthrough when writers are real terminals and no callbacks/combined output are enabled.
  • Exposed OnExecCmd hook to mutate the underlying exec.Cmd before start.
  • Added Linux/Darwin PTY implementations with no external deps and comprehensive tests to keep 100% coverage.
  • Updated docs and examples for new APIs and behavior changes.

Behavior Changes

  • When WithPTY() is enabled, stdout/stderr are merged; OnStdout and OnStderr both receive the same lines; Result.Stderr is empty.
  • WithPTY() is not supported for pipelines and returns a clear error.
  • When Stdout/Stderr writers are real terminals and no callbacks/combined output are used, execx now passes through without buffering.

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cmilesdev cmilesdev merged commit d19b7f4 into main Jan 9, 2026
1 check passed
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.

3 participants