Skip to content

Fix interactive prompts when run via curl pipe bash#12

Merged
matthew-on-git merged 1 commit intomainfrom
fix/curl-pipe-tty
Mar 10, 2026
Merged

Fix interactive prompts when run via curl pipe bash#12
matthew-on-git merged 1 commit intomainfrom
fix/curl-pipe-tty

Conversation

@matthew-on-git
Copy link
Contributor

Summary

  • Add prompt_read helper that reads from /dev/tty instead of stdin
  • Replace all 8 read -r calls with prompt_read so interactive mode works when piped via curl -fsSL https://devrail.dev/init.sh | bash
  • Matches the pattern used by rustup, nvm, and other curl-pipe-bash installers

Test plan

  • curl -fsSL https://devrail.dev/init.sh | bash enters interactive mode and accepts input
  • curl -fsSL https://devrail.dev/init.sh | bash -s -- --help prints usage
  • curl -fsSL https://devrail.dev/init.sh | bash -s -- --all --languages python --ci github --yes runs non-interactively
  • 16/16 bats tests pass
  • make check passes

🤖 Generated with Claude Code

When run via `curl | bash`, stdin is consumed by the script content so
interactive prompts silently fail. Read from /dev/tty instead, matching
the pattern used by rustup, nvm, and other curl-pipe-bash installers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matthew-on-git matthew-on-git merged commit 4d4c8ab into main Mar 10, 2026
3 checks passed
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