fix(sync_run): check stdin not stdout for TTY guard

The --select TTY guard used sys.stdout.isatty(), but interactive
prompts read from stdin. This caused two failure modes:

- Redirecting stdout (e.g. | tee log.txt) blocked --select even
  though the keyboard was available
- With stdin piped in CI, stdout could still be a TTY, allowing
  the prompt to proceed and block forever on absent input
This commit is contained in:
AlexKucera committed 2026-06-06 17:30:48 +02:00
1 parent 77712951d0
commit 4e25fb27df
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -216,7 +216,7 @@ def sync_run(
# 5. Select mode pipeline (ADR #6)
if select_mode:
if not sys.stdout.isatty():
if not sys.stdin.isatty():
console.print("[red]--select requires an interactive terminal.[/red]")
return SyncRunResult(fatal_error="--select requires an interactive terminal")