Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an --env flag to specify which env files to load #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tijn
Copy link

@tijn tijn commented Feb 20, 2024

By default godotenv.Load will load the file .env. This commit adds an option to override that. You can, for example use
--env=.env,.env.local to allow team members to override shared environment variables or --env="" to avoid loading any environment file at all.

The latter is vital for when the subprocesses load their own environment files in a certain order. I.E. dotenv-rails

Note that this option is also included in the original foreman where it functions exactly the same as far as I can tell.

By default `godotenv.Load` will load the file `.env`. This commit adds
an option to override that. You can, for example use
`--env=.env,.env.local` to allow team members to override environment
variables or `--env=""` to avoid loading any environment file at all.
@manuelvanrijn
Copy link

@mattn just a friendly ping to see if we might get this reviewed/merged?

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