kerimdzhanov / dotenv-flow

Loads environment variables from .env.[development|test|production][.local] files for Node.js® projects.
MIT License
862 stars 35 forks source link

Error with symlink .env.local #46

Closed filoucrackeur closed 1 year ago

filoucrackeur commented 3 years ago

Hello it seems that file which are symlinks are not found and not loaded :(

$ ls -la
.env OK
.env.local -> /var/xxx/xxx/.env.local   NOK
kerimdzhanov commented 1 year ago

It seems that this behavior is not relevant since Node.js v10, where fs.readFile started reading the symlink target files (not the content of the symlink file itself), and since dotenv-flow utilizes fs.readFileSync to read the contents of the .env* files, if you upgrade Node.js, dotenv-flow will be reading symlinks as well.