Skip to content

Fix EOFError in non-interactive init flows#2162

Merged
Saga4 merged 2 commits into
mainfrom
fix/init-eoferror-nontty
May 29, 2026
Merged

Fix EOFError in non-interactive init flows#2162
Saga4 merged 2 commits into
mainfrom
fix/init-eoferror-nontty

Conversation

@mashraf-222
Copy link
Copy Markdown

What changed

  • handle non-interactive init confirmation prompts by falling back to safe defaults instead of raising EOFError
  • skip optional GitHub Actions setup prompts when init runs without interactive stdin
  • add regression coverage for Python, JavaScript, TypeScript, Java, Go, and the workflow setup path

Tested

  • uv run pytest -q tests/test_init_yes.py tests/test_init_javascript.py tests/test_init_java_go.py tests/test_github_workflow.py
  • manual plain non-interactive init runs with empty stdin in Python, JavaScript, TypeScript, Java, and Go sample repos

@mashraf-222 mashraf-222 requested review from HeshamHM28 and Saga4 and removed request for misrasaurabh1 May 29, 2026 14:26
@mashraf-222
Copy link
Copy Markdown
Author

mashraf-222 commented May 29, 2026

Clarification on the intended behavior here:

  • The existing interactive UX is preserved. If codeflash init is run from a normal interactive TTY and a valid existing Codeflash config is present, we still show the usual re-configure? prompt.
  • The change in this PR only affects the broken non-interactive path: if plain codeflash init is run without usable stdin, we now fall back to the prompt default instead of surfacing a raw EOFError traceback.
  • For optional GitHub Actions setup, the non-interactive path skips setup rather than hanging or creating side effects it could not confirm.

So this PR is not removing the existing prompt UX; it only makes the no-stdin path fail safe instead of fail noisy.

@mashraf-222
Copy link
Copy Markdown
Author

eof.fix.mp4

@Saga4 Saga4 merged commit 8df2b21 into main May 29, 2026
26 of 31 checks passed
@Saga4 Saga4 deleted the fix/init-eoferror-nontty branch May 29, 2026 17:36
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