stimulus_reflex icon indicating copy to clipboard operation
stimulus_reflex copied to clipboard

Installer should work in CI (noninteractive) environment

Open la-ruby opened this issue 1 year ago • 1 comments

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.

la-ruby avatar Jun 07 '24 14:06 la-ruby

Hey @la-ruby, thanks for opening this issue!

I was wondering what the use-case for this might be, would you mind to elaborate? I'd be happy to accept a PR to improves this if you want to have a go.

marcoroth avatar Dec 15 '24 08:12 marcoroth