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

Variable expansion (reference) should work without an additional package #694

Open
MiguelMike opened this issue Nov 5, 2022 · 2 comments

Comments

@MiguelMike
Copy link

Let's assume we have an .env file:

FIRST_NAME="Joe"
SURNAME="Doe"
FULL_NAME="${FIRST_NAME} ${SURNAME}"

After this file is sourced $FULL_NAME would automatically have the referenced variables filled. That's what one would expect more often than not. This is not the case when using dotenv. To achieve this an additional package dotenv-expand is required.

It would make much more sense if dotenv expanded referenced variables by default. A config option {expand: false} might be used to change this behavior. Am I missing something?

@motdotla
Copy link
Owner

motdotla commented May 4, 2023

You have a good point. Will consider this.

@deepam-kapur
Copy link
Contributor

can I work on this @motdotla?

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

No branches or pull requests

3 participants