Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Improve env file handling#458

Merged
mattjohnsonpint merged 1 commit intomainfrom
mjp/hyp-2396-handle-env-files-better
Oct 12, 2024
Merged

Improve env file handling#458
mattjohnsonpint merged 1 commit intomainfrom
mjp/hyp-2396-handle-env-files-better

Conversation

@mattjohnsonpint
Copy link
Contributor

Description

With this change, we now support similar handling of .env files found in other frameworks.

In order of precedence from top to bottom:

  • pre-assigned environment variables
  • .env.[environment].local
  • .env.local
  • .env.[environment]
  • .env

For example, if a variable is set both in .env.local and .env, then one in .env.local should apply, and the one in .env should be ignored. However other variables from .env should still apply, if they haven't been set yet.

Checklist

  • Code compiles correctly and linting passes locally
  • Tests for new functionality and regression tests for bug fixes added
  • Documentation added or updated
  • Entry added to the CHANGELOG.md file describing and linking to this PR

@mattjohnsonpint mattjohnsonpint requested a review from a team October 12, 2024 01:38
@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) October 12, 2024 01:39
@mattjohnsonpint mattjohnsonpint merged commit e93243e into main Oct 12, 2024
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-2396-handle-env-files-better branch October 12, 2024 01:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants