solidusio / solidus_starter_frontend

🎨 Rails-based starter kit for your Solidus storefront.
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

Running `rails g solidus:install` multiple times duplicates the gemfile block #363

Open spaghetticode opened 7 months ago

spaghetticode commented 7 months ago

Solidus Version: master

To Reproduce Create a new solidus store, then run rails g solidus:install twice and pick the starter frontend from the options.

The second time, the Gemfile will include a list of duplicate gems, coming from https://github.com/solidusio/solidus_starter_frontend/blob/main/template.rb#L67-L98.

It's arguable that the install process should be idempotent (you should install only once), but if for some reason the first run breaks, then running it twice sounds legit to me, so we may want to avoid this duplication, which of course is not welcome by bundler complaining with Your Gemfile lists the gem responders (>= 0) more than once. You should probably keep only one of them. and such.

Current behavior store frontend gems are added twice to the Gemfile

Expected behavior store frontend gems are added only once to the Gemfile