Skip to content

Conversation

@federicobadini
Copy link

@federicobadini federicobadini commented Dec 9, 2025

This PR gixes issues with environment file management during deployments by preventing duplicate env vars and automatically reseeding .env when .env.example is modified.

Adds a hasEnvVariable function to check if environment variables already exist in the .env file before concatenating them during deployment. This prevents duplicate entries.
Adds logic to detect changes to .env.example during a git pull or merge. If .env.example was modified, the deployment process will automatically reseed the .env file to ensure environment variables are up to date.
The wasEnvExampleModified function now takes a Shell instance as a parameter instead of creating a new one internally.
Renamed addEnvFileCommand to copyEnvFileCommand and hasEnvVariable to isEnvVariableDefined for clarity.
@federicobadini federicobadini changed the title Fix env seeding Fix env file seeding and prevent duplicate environment variables Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants