vite_ruby icon indicating copy to clipboard operation
vite_ruby copied to clipboard

fix: Check if `web` entry already on `Procfile.dev` before appending it

Open Andy9822 opened this issue 8 months ago • 4 comments

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 📷

image

Fixes #541

Andy9822 avatar Apr 13 '25 19:04 Andy9822