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 fails to load .env file that include backslashes #73

Open
mathroc opened this issue Dec 6, 2021 · 1 comment
Open

dotenv fails to load .env file that include backslashes #73

mathroc opened this issue Dec 6, 2021 · 1 comment

Comments

@mathroc
Copy link

mathroc commented Dec 6, 2021

A=\.
B="\."
C='\.'

Only C works. If A or B are present, the file fails to load.

Since dotenv.ok() silence the error, it's quite hard to detect. I guess it should not fail if the file is absent, so we could .expect() it and be more confident

@isosphere
Copy link

This was confusing - I agree that using .expect() by default is a good idea, it would have drawn me the reason why I had access to every env variable except the one with a backslash in it, which was really confusing!

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