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

Follow dotenv-flow variable precedence #492

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jleem99
Copy link

@jleem99 jleem99 commented Feb 28, 2024

Link to issue

Resolves #491

Description of changes being made

  • Change the order of merging multiple variables to:

    1. Default env file (.env)
    2. Local env file (.env.local)
    3. Mode env file (.env.my-env)
    4. Mode local env file (.env.my-env.local)
    5. Command line variables
  • Add test cases for the variable precedence.

Follow dotenv-flow variable precedence when multiple env files are
present.

The order of precedence is as follows (Low to high):
  1. Default env file (.env)
  2. Local env file (.env.local)
  3. Mode env file (.env.my-env)
  4. Mode local env file (.env.my-env.local)
  5. Command line variables
@jleem99
Copy link
Author

jleem99 commented Mar 7, 2024

@goatandsheep I'd love if you could take a look when you get a chance. Thanks!

@goatandsheep
Copy link
Owner

Sorry it will take a little bit longer. This looks ok but I want to do some local testing

@goatandsheep
Copy link
Owner

i need a little bit longer. sorry for the delays.

@goatandsheep goatandsheep self-requested a review March 20, 2024 13:41
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.

Follow dotenv-flow variable precedence
2 participants