Skip to content

Commit c0cc20c

Browse files
committed
Install generator: Don't fail if starter frontend not present
We're expecting the install generator of this gem to change things in the starter frontend, but the generated Dummy app runs on the legacy frontend. This fails, migrations don't run, and all tests fail. This is not the cleanest solution: Ideally we'd have an install generator for dummy apps that works with the starter frontend template, but we're not there.
1 parent 993c37a commit c0cc20c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/generators/solidus_subscriptions/install/install_generator.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def add_javascripts
1919

2020
def copy_starter_frontend_files
2121
return if options[:frontend] != 'starter'
22+
return unless File.exist?(Rails.root.join('app/views/cart_line_items/_product_submit.html.erb'))
2223

2324
copy_file 'app/views/cart_line_items/_subscription_fields.html.erb'
2425
prepend_to_file 'app/views/cart_line_items/_product_submit.html.erb', "<%= render 'cart_line_items/subscription_fields' %>\n"

0 commit comments

Comments
 (0)