Skip to content

fix: skip init prompts when stdin is not a TTY - #16

Open
manish-wekan wants to merge 1 commit into
developfrom
fix/cli-skip-init-prompts-non-tty
Open

fix: skip init prompts when stdin is not a TTY#16
manish-wekan wants to merge 1 commit into
developfrom
fix/cli-skip-init-prompts-non-tty

Conversation

@manish-wekan

Copy link
Copy Markdown
Collaborator

Summary

  • Skip Description/Author prompts in nitrostack-py init when stdin is not a TTY, so NitroStudio generate (step 4 of 5) and CI cannot hang on readline().
  • --skip-install still only skips dependency install; this change is the missing non-interactive path.
  • If the target directory already exists and stdin is not a TTY, exit 1 instead of prompting to overwrite.
  • Add isolated CLI tests that leave stdin open and never write, matching Studio's inherited-stdin hang.

Test plan

  • python -m pytest tests/test_cli_studio_noninteractive.py
  • python -m nitrostack.cli.main init demo --template python-starter --skip-install with stdin closed completes without prompts
  • Interactive TTY init still asks Description/Author
  • NitroStudio generate Python project no longer hangs on step 4 of 5

Made with Cursor

Studio and CI inherit an open stdin that never writes, so Description/Author readline hung generate. Use defaults off-TTY and refuse overwrite without a prompt.
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.

1 participant