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

dotenv! documentation does not match actual behaviour #71

Open
bk138 opened this issue Sep 14, 2021 · 1 comment
Open

dotenv! documentation does not match actual behaviour #71

bk138 opened this issue Sep 14, 2021 · 1 comment

Comments

@bk138
Copy link

bk138 commented Sep 14, 2021

Hi there,
The README in https://github.com/dotenv-rs/dotenv/blob/master/README.md#usage states that

dotenv_codegen provides the dotenv! macro, which behaves identically to env!, but first tries to load a .env file at compile time.

However, I found v0.15 to only work with a .env file present and not getting any vars from the "real" environment, i.e. according to behaviour, the docs should state

dotenv_codegen provides the dotenv! macro, which behaves identically to env!, but instead tries to load a .env file at compile time.

Which one is correct, current docs or current implementation?

@mblarsen
Copy link

This indeed is an unexpected behavior. I cannot get any other value of that provided in .env at compile time. Cannot change the .env and cannot as you state provide the value through std env.

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

2 participants