dotenv-rs / dotenv

Library to help supply environment variables in testing and development
MIT License
566 stars 45 forks source link

dotenv silently fails to read a string variable if it is not enclosed in quotes in .env file #38

Open rubyfin opened 4 years ago

rubyfin commented 4 years ago

If I have a string variable in a .env file like this, then it won't find it and will just ignore it:

PORT=5000 NICE_NAME=My Service

But if I add quotes to the string, then everything is fine:

PORT=5000 NICE_NAME="My Service"

I understand the rationale, but I think it would be better to display an error / warning message, instead of silently dropping the offending variable.