Skip to content

Conversation

@K4sku
Copy link

@K4sku K4sku commented Nov 14, 2023

No description provided.

private

def load_dotenv_if_present(app_env)
return "-e #{APP_ROOT}/.env.#{app_env}" if File.exist?("#{APP_ROOT}/.env.#{app_env}")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good, can you also add support for .env.#{app_env}.local?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added per suggestion, but I have changed the order to match https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

.env.x.local takes precedence over .env.x

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