-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: use for
loop in Dotenv::GetPathFromArgs
#54385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a cc test for testing only this function and every edge case you're targeting?
ed754f2
to
b7af227
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54385 +/- ##
==========================================
- Coverage 87.08% 87.07% -0.01%
==========================================
Files 648 648
Lines 182341 182338 -3
Branches 34982 34981 -1
==========================================
- Hits 158783 158773 -10
- Misses 16831 16833 +2
- Partials 6727 6732 +5
|
@anonrig Do you think this should land (eventually), or it should be held-off, and a redone |
Closing in favor of #54913 |
This PR replaces the old
while
loop with a newerfor
loop.Fixes the following edge cases:
node script.js --env-file .env node --env-file-ABCD .env node -- --env-file .env node -invalid --env-file .env # this will error, but the env file is still processed
Unfortunately, this introduces an edge case where some argument parameters, such as
--eval <...>
cause any future--env-file
arguments to be ignored.Fixes #54255
Fixes #54232
Related to #54237