Commit 79d945a
fix(shell): guard TUI render against non-TTY Docker environments
Ink's render() calls setRawMode(true) on mount. When docker-git runs
without a pseudo-TTY (docker exec without -t, CI, piped stdin), this
throws "Raw mode is not supported" and waitUntilExit() never resolves,
causing an infinite hang.
- Wrap render() in Effect.suspend and check process.stdin.isTTY and
typeof process.stdin.setRawMode before calling render()
- Fail immediately with a descriptive InputReadError guiding the user
to attach a terminal (ssh or docker run -it)
Invariant: ∀ env: ¬isTTY(env) → fail(InputReadError) ∧ ¬hang
Closes #100
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5940a62 commit 79d945a
1 file changed
Lines changed: 23 additions & 3 deletions
File tree
- packages/app/src/docker-git
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
285 | 295 | | |
286 | 296 | | |
287 | 297 | | |
288 | 298 | | |
289 | 299 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
293 | 313 | | |
294 | 314 | | |
295 | 315 | | |
| |||
0 commit comments