Skip to content
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

Environment file option matches on substring (--env-file) #55118

Closed
kristianthorsen opened this issue Sep 25, 2024 · 1 comment
Closed

Environment file option matches on substring (--env-file) #55118

kristianthorsen opened this issue Sep 25, 2024 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@kristianthorsen
Copy link

Version

v20.11.1

Platform

Darwin M-02572 23.6.0 Darwin Kernel Version 23.6.0: Wed Jul 31 20:53:05 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T8112 arm6

Subsystem

No response

What steps will reproduce the bug?

Run this version of node.
Try to run a given .js file with "node index.js --env-file-path" or any --env-file[suffix]

It will throw the following error: not found

image

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior? Why is that the expected behavior?

I expect to only be implicated by the --env-file flag when passing the exact option.

I expect to be able to create my own logic around parsing the option for instance --env-file-path.

What do you see instead?

Instead it gives me this not found error.

image

I am aware that this can be easily worked around, but getting the error randomly took some time to debug.

Additional information

This is not urgent but thought it might be nice to instead match on the entire string "--env-file" rather than all arguments that starts with it being implicated.

@kristianthorsen kristianthorsen changed the title Environment file option matches on substring Environment file option matches on substring (--env-file) Sep 25, 2024
@RedYetiDev RedYetiDev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
@RedYetiDev RedYetiDev added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Sep 25, 2024
@RedYetiDev
Copy link
Member

Fixed by #54913
Duplicate of #54255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

2 participants