Version
20.12.0
Platform
Linux xxx 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
Description
process.loadEnvFile() doesn't ignore (first) comment line.
What steps will reproduce the bug?
Create an example .env file with two comments
and run the following code snippet
process.loadEnvFile();
console.log("FOO", process.env.FOO);
console.log("BAR", process.env.BAR);
Example repo: https://github.com/steffen-4s1/dotenv
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
All comment lines should be ignored.
FOO undefined
BAR undefined
What do you see instead?
FOO isn't ignored.
Additional information
No response