adeharo9 / cpp-dotenv

Loads environment variables from .env files for C++ projects.
BSD 3-Clause "New" or "Revised" License
87 stars 21 forks source link

Able to read .env links #2

Closed Vi1i closed 4 years ago

Vi1i commented 5 years ago

I was trying to do a quick test and used a soft link in Linux (ln -s) and received:

./read 
terminate called after throwing an instance of 'dotenv::syntax_error'
  what():  Syntax error on line 15:29
Aborted (core dumped)

If I do a direct copy instead, no errors. I have verified that I did a correct link.

Interestingly my file is 15 lines long.

Vi1i commented 5 years ago

Hmm It might not be an issue with the link. I think that perhaps having a environment variable that has spaces in it might be the cause. Commenting out the below line fixed the issue. Also, changing the spaces to anything else removes the error. This is not how python-dotenv works, so I am unsure if the grammar is wrong here or the grammar is wrong there.

L4_4SQ_FILE_FILTER="Chicago LosAngeles NewYork"

adeharo9 commented 4 years ago

There were some issues while parsing strings (described on #5 ) that should already be fixed with the last commmits on dev branch. Going to do some tests, add a few more bug corrections and push it all to master.