diff --git a/admin/lib/solidus_admin/install_tailwindcss.rb b/admin/lib/solidus_admin/install_tailwindcss.rb index d6267684cf9..1b882a068ed 100644 --- a/admin/lib/solidus_admin/install_tailwindcss.rb +++ b/admin/lib/solidus_admin/install_tailwindcss.rb @@ -73,7 +73,9 @@ end RUBY -append_file ".gitignore", "app/assets/builds/solidus_admin/" +if Rails.root.join(".gitignore").exist? + append_file ".gitignore", "app/assets/builds/solidus_admin/" +end unless Rails.root.join("Procfile.dev").exist? create_file "Procfile.dev", <<~YAML diff --git a/core/lib/generators/solidus/install/install_generator.rb b/core/lib/generators/solidus/install/install_generator.rb index c8c16452dfa..44794d4b35e 100644 --- a/core/lib/generators/solidus/install/install_generator.rb +++ b/core/lib/generators/solidus/install/install_generator.rb @@ -179,7 +179,9 @@ def install_solidus_admin return unless options[:admin_preview] say_status :installing, "SolidusAdmin", :blue - bundle_command 'add solidus_admin -v ">= 0.2"' + unless File.read(app_path.join('Gemfile')).include?('solidus_admin') + bundle_command 'add solidus_admin -v ">= 0.2"' + end generate 'solidus_admin:install' end