We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v21.7.1
Darwin gray.local 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:45:49 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6020 arm64
env parser
Create .env:
.env
VAR=first # SOMETHING=else # VAR=second
Run the testcase:
node --env-file=.env -e 'console.log(process.env.VAR)'
The output is second instead of first.
second
first
Adding a non-commented variable after # SOMETHING makes the parser work correctly.
# SOMETHING
100% reproduction
Commented-out line of .env is ignored.
Commented-out part is parsed and the variable value is overwritten.
env parser works correctly in 21.6.2, emitting first in console.
The text was updated successfully, but these errors were encountered:
I can reproduce the bug, I believe that the regression may have been introduced by this #51289 I will fix it asap
Sorry, something went wrong.
@anonrig could you please close this ?
--env-file
Successfully merging a pull request may close this issue.
Version
v21.7.1
Platform
Darwin gray.local 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:45:49 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6020 arm64
Subsystem
env parser
What steps will reproduce the bug?
Create
.env
:Run the testcase:
node --env-file=.env -e 'console.log(process.env.VAR)'
The output is
second
instead offirst
.Adding a non-commented variable after
# SOMETHING
makes the parser work correctly.How often does it reproduce? Is there a required condition?
100% reproduction
What is the expected behavior? Why is that the expected behavior?
Commented-out line of
.env
is ignored.What do you see instead?
Commented-out part is parsed and the variable value is overwritten.
Additional information
env parser works correctly in 21.6.2, emitting
first
in console.The text was updated successfully, but these errors were encountered: