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

Override existing ENV variables #44

Open
askoretskiy opened this issue Apr 26, 2020 · 3 comments
Open

Override existing ENV variables #44

askoretskiy opened this issue Apr 26, 2020 · 3 comments

Comments

@askoretskiy
Copy link

I miss one thing that could be helpful for others -- there is no way the library would override existing env variable via .env file. Sometimes it is needed though.

For example, I'd like to override PATH. If I create a file .env with PATH=/opt/bin:${PATH} that would have no effect.

Did you consider any modificator for KEY? Maybe, !? That could mean to override existing env variable.

In my case that would be !PATH=/opt/bin:${PATH}.

What do you think?

@Plecra
Copy link
Contributor

Plecra commented Jun 25, 2020

https://github.com/bkeepers/dotenv implements this as an alternative entrypoint. Would something like that be suitable for your use case?

@msrd0
Copy link

msrd0 commented Oct 24, 2021

I think a separate entrypoint would be helpful

@MaxFangX
Copy link

I agree that (if implemented) this should be done as a separate entrypoint. The current behavior is ideal for me, because I can override the variables in .env in one off commands like FOO=1 cargo build

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

4 participants