You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script argument --env-file is wrongly used as node option #54232
How often does it reproduce? Is there a required condition?
Happens always.
What is the expected behavior? Why is that the expected behavior?
Node should not try to read the env file and the test script should print
works
when passing a script argument --env-file.
What do you see instead?
Node tries to read the env file and, for example, returns the following for nonexistent files:
node: nonexistent-file: not found
Additional information
To me, it looks like that the function Dotenv::GetPathFromArgs is missing a break from the while loop when it encounters a non-option commandline argument (the script path) or the argument separator --.
Activity
avivkeller commentedon Aug 6, 2024
Able to reproduce on (Kali) linux: