-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
Well, the problem is really simple. Right now when you pass a file to --env-file
such as:
node --env-file=.env
It will load correctly, provided you have a file called .env
relative to the current working directory (as stated in the documentation).
However, if you call the command with an absolute path such as:
node --env-file=/home/user/some/path/.env
It will throw an error, even if the file exists:
node: /home/user/some/path/.env: not found
What is the feature you are proposing to solve the problem?
I propose that passing an absolute path to --env-file
would detect it as such and try to load the file. Also, the current error message could be improved.
Supporting absolute paths might sounds like a niche feature, but it can be very useful in the context of mono-repositories.
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.