Shopify / cli

Build apps, themes, and hydrogen storefronts for Shopify
https://shopify.dev
MIT License
425 stars 130 forks source link

CLI should not clobber `.env` files #4704

Open jagthedrummer opened 6 days ago

jagthedrummer commented 6 days ago

I have a .env file in my project for configuring a number of development/local ENV vars. After running shopify app deploy this file was clobbered and all of the organization within the file is gone and all of the comments documenting exactly what each value represents were removed. The file is not under source control since it contains secrets, so now all of that is just gone. This feels extremely hostile.

isaacroldan commented 2 days ago

Hi @jagthedrummer, this is definitely a bug. The intention is to just append or update specific keys in the .env, without affect the existing content. Apologies for the inconvenience caused by this bug.

A fix for this issue will be released in the next CLI version (3.70), it should be out in a couple weeks.