Skip to content

Commit

Permalink
install plugins after the frontend is already available
Browse files Browse the repository at this point in the history
Otherwise installation checking for SolidusSupport.frontend_available?
can fail.
  • Loading branch information
elia committed Oct 12, 2022
1 parent e449f56 commit b5ca42d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions core/lib/generators/solidus/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,6 @@ def create_database
rake 'db:create'
end

def run_bundle_install_if_needed_by_plugins
@plugins_to_be_installed.each do |plugin_name|
gem plugin_name
end

BundlerContext.bundle_cleanly { run "bundle install" } if @plugins_to_be_installed.any?
run "spring stop" if defined?(Spring)

@plugin_generators_to_run.each do |plugin_generator_name|
generate "#{plugin_generator_name} --skip_migrations=true"
end
end

def install_frontend
return if options[:frontend] == 'none'

Expand All @@ -205,6 +192,19 @@ def install_frontend
call(frontend, installer_adds_auth: @plugins_to_be_installed.include?('solidus_auth_devise'))
end

def run_bundle_install_if_needed_by_plugins
@plugins_to_be_installed.each do |plugin_name|
gem plugin_name
end

BundlerContext.bundle_cleanly { run "bundle install" } if @plugins_to_be_installed.any?
run "spring stop" if defined?(Spring)

@plugin_generators_to_run.each do |plugin_generator_name|
generate "#{plugin_generator_name} --skip_migrations=true"
end
end

def run_migrations
if @run_migrations
say_status :running, "migrations"
Expand Down

0 comments on commit b5ca42d

Please sign in to comment.