Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
src: return error --env-file if file is missing#50588
New issue
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
src: return error --env-file if file is missing #50588
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Nov 7, 2023
Review requested:
|
3f6ba1c to b42914aCompareb42914a to fe0265fCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
226b7f9 to f2365e5Comparenodejs-github-bot commented Nov 10, 2023
nodejs-github-bot commented Nov 11, 2023
nodejs-github-bot commented Nov 11, 2023
arxngr commented Nov 11, 2023
Seems several CI have failed even already retrying, is this expected? 🤔 |
arxngr commented Nov 11, 2023
Unit testing goes error on Windows, will check later and maybe come back with a new push |
f2365e5 to 192d633Comparenodejs-github-bot commented Nov 13, 2023
a2461d4 to d3b85c1Comparenodejs-github-bot commented Nov 13, 2023
nodejs-github-bot commented Nov 14, 2023
nodejs-github-bot commented Nov 14, 2023
Landed in 996d198 |
PR-URL: #50588 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: nodejs#50588 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: #50588 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
PR-URL: #50588 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
jmjf commented Jan 11, 2024
@ardinugrxha Is it intended that this change will break existing npm scripts and the CI processes that rely on them? I have a test script that runs tests with This script worked in CI before 20.11 because CI has env variables set up in the CI environment. Now it fails. My workaround will be to duplicate the test script without |
acidoxee commented Jan 13, 2024
Hi, I have the same issue as @jmjf. Some of my scripts used #50993 seems like a nice alternative that would have been nice to ship at the same time, but it's not there yet. Also, it may have been sweeter to ship it the other way around, like adding a |
anonrig commented Jan 13, 2024
@acidoxee This is an experimental feature. Breaking changes are meant to happen. |
jmjf commented Jan 13, 2024 via email
Breaking changes in LTS? I guess I misunderstood LTS as being stable. Nevertheless, these cases indicate that there are cases where no env file is reasonable, so maybe this change should be reconsidered. …On Sat, Jan 13, 2024, 08:45 Yagiz Nizipli ***@***.***> wrote: @acidoxee <https://github.com/acidoxee> This is an experimental feature. Breaking changes are meant to happen. — Reply to this email directly, view it on GitHub <#50588 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AASIV63GFKYX4PAVZQKLSQTYOKFY7AVCNFSM6AAAAAA7AVC2P2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJQGQ3DGMBYGQ> . You are receiving this because you were mentioned.Message ID: ***@***.***> |
anonrig commented Jan 13, 2024
|
acidoxee commented Jan 14, 2024
Oh, my apologies then, I was pretty sure it was considered stable already for some reason. A notable change in the changelog would still have been nice, but you're 100% right to do breaking changes if it's experimental and if that leads to a better, thoughtful API in the end 👍 |
BoscoDomingo commented May 13, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Hi, sorry for the noise this may cause: Are you considering adding the optionality back? It'd be nice to see a I can also try to do it myself, but I've 0 familiarity with Node's codebase and C++, when it might be an easy task for anyone more knowledgeable than me. Edit: There's already a Feature Request for this, #50993, and a related issue #51451 |
Motivated by #50536
NodeJS currently supports env file parsing. However, in cases where the file is missing, the process continues to execute. Since the env file is a crucial file, I propose that we return an error if the env file is missing. This will prevent errors in the future and allow us to detect them as early as possible.
Testing Scenario:
Given files tree:
run:
node --env-file=test.env hello.jsoutput: it will executed
run:
node --env-file=oops.env hello.jsoutput: node: oops.env not found
run:
node --env-file=test.env --env-file=test1.env hello.jsoutput: it will executed
run:
node --env-file=test.env --env-file=oops.env hello.jsoutput: node: oops.env not found