Open askoretskiy opened 4 years ago
https://github.com/bkeepers/dotenv implements this as an alternative entrypoint. Would something like that be suitable for your use case?
I think a separate entrypoint would be helpful
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
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
withPATH=/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?