stimulusreflex / stimulus_reflex

Build reactive applications with the Rails tooling you already know and love.
https://docs.stimulusreflex.com
MIT License
2.29k stars 176 forks source link

Installer should work in CI (noninteractive) environment #709

Open la-ruby opened 5 months ago

la-ruby commented 5 months ago

It would be nice if this worked in CI environment / github actions:

./bin/rails stimulus_reflex:install
bin/rails aborted!
NoMethodError: undefined method `chomp' for nil (NoMethodError)
      input = Rails.env.test? ? "tmp/app/javascript" : $stdin.gets.chomp
                                                                  ^^^^^^
Tasks: TOP => stimulus_reflex:install
(See full trace by running task with --trace)
✨ Installing StimulusReflex and CableReady ✨
If you have any setup issues, please consult https://docs.stimulusreflex.com/hello-world/setup
or get help on Discord: https://discord.gg/stimulus-reflex. We are here for you. 💙
We recommend running git commit before proceeding. A diff will be generated at the end.
Where do JavaScript files live in your app? Our best guess is: app/javascript 🤔
Press enter to accept this, or type a different path.
> 
Error: Process completed with exit code 1.