vite_ruby
vite_ruby copied to clipboard
fix: Check if `web` entry already on `Procfile.dev` before appending it
Description 📖
This pull request adds a logic to check wether the Procfile.dev already has a web entry. In case it does, we don't append a duplicate web entry.
Background 📜
This was happening because the CLI code would append the entry without checking the file content.
However, on Rails apps generated with the Rails generator, the web entry would already be in the Procfile. This would cause 2 web entries on the same file
The Fix 🔨
By changing the append method to be append_if_no_web_entry we can safely perform the action since we are now checking the file content.
Screenshots 📷
Fixes #541