Commit f605414
fix(codex-fleet-demo): guard attach behind TTY check, drop exec (#168)
up.sh ended with 'exec tmux attach' which replaces the calling shell with
tmux. When the script is launched without a controlling terminal (kitty
launcher, command picker, non-interactive shell, etc.), the attach
aborts with 'open terminal failed: not a terminal' and the parent
process is left in a broken state -- observed to lock up the kitty
session selector that spawned up.sh.
Guard the attach behind '[[ -t 0 && -t 1 ]]' and drop the 'exec' so the
shell returns cleanly whether or not the attach actually happens. When
no TTY is present, print the manual attach command and exit 0 normally.
Tear-down + re-up is the recovery path if you hit this in the wild.
Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>1 parent 47439e6 commit f605414
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
213 | 218 | | |
214 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
215 | 225 | | |
0 commit comments