src: fix loadEnvFile ENOENT error#52438
Merged
nodejs-github-bot merged 1 commit intonodejs:mainfrom Apr 17, 2024
Merged
Conversation
anonrig
reviewed
Apr 9, 2024
Before this change the error message for `process.loadEnvFile()` without an `.env` file present in the current working directory was looking like this: `ENOENT: .env, Failed to load '%s'.` This obviously isn't what the author intended. To fix that, just return a "plain" ENOENT open error. It should be descriptive enough. That means for the above example, the error message is now `ENOENT: no such file or directory, open '.env'`.
c643a3a to
c2730d9
Compare
anonrig
approved these changes
Apr 10, 2024
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
Collaborator
|
Landed in c1d9f42 |
aduh95
pushed a commit
that referenced
this pull request
Apr 29, 2024
Before this change the error message for `process.loadEnvFile()` without an `.env` file present in the current working directory was looking like this: `ENOENT: .env, Failed to load '%s'.` This obviously isn't what the author intended. To fix that, just return a "plain" ENOENT open error. It should be descriptive enough. That means for the above example, the error message is now `ENOENT: no such file or directory, open '.env'`. PR-URL: #52438 Reviewed-By: Yagiz Nizipli <[email protected]>
marco-ippolito
pushed a commit
that referenced
this pull request
May 2, 2024
Before this change the error message for `process.loadEnvFile()` without an `.env` file present in the current working directory was looking like this: `ENOENT: .env, Failed to load '%s'.` This obviously isn't what the author intended. To fix that, just return a "plain" ENOENT open error. It should be descriptive enough. That means for the above example, the error message is now `ENOENT: no such file or directory, open '.env'`. PR-URL: #52438 Reviewed-By: Yagiz Nizipli <[email protected]>
Merged
marco-ippolito
pushed a commit
that referenced
this pull request
May 3, 2024
Before this change the error message for `process.loadEnvFile()` without an `.env` file present in the current working directory was looking like this: `ENOENT: .env, Failed to load '%s'.` This obviously isn't what the author intended. To fix that, just return a "plain" ENOENT open error. It should be descriptive enough. That means for the above example, the error message is now `ENOENT: no such file or directory, open '.env'`. PR-URL: #52438 Reviewed-By: Yagiz Nizipli <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change the error message for
process.loadEnvFile()without an.envfile present in the current working directory was looking like this:ENOENT: .env, Failed to load '%s'.This obviously isn't what the author intended.To fix that, just return a "plain" ENOENT open error. It should be descriptive enough. That means for the above example, the error message is now
ENOENT: no such file or directory, open '.env'.