mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
* fix(cli): prevent hang when spawned without TTY When the CLI is spawned as a child process without a TTY (e.g., from spawn() in smoke tests or CI), process.stdin.isTTY is false even when nothing is piped to stdin. This caused readStdinIfPiped() to wait up to 5 minutes for input that would never arrive. Fix by using fs.fstatSync(0) to check if stdin is actually a FIFO (pipe) or file before waiting. This correctly handles: - Spawned processes without TTY → returns immediately - Actual piped input (echo "x" | cline) → waits and reads - stdin from /dev/null → returns immediately * chore: add changeset * test(cli): add tests for stdin type detection
72 B
72 B
cline
| cline |
|---|
| patch |
fix(cli): prevent hang when spawned without TTY