-
Notifications
You must be signed in to change notification settings - Fork 36
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
no error property set when .env file is not present #41
Comments
Hey @vineetdigit, The reason for such difference in behavior is that in "dotenv-flow", we may not have On the other hand, if we have no What are your thoughts? |
My exact thoughts. As long as at least one of the files is present and it was successfully parsed, then result.parsed property will contain parsed values and result.error property should be undefined. Otherwise, result.error property will be set but the result.parsed will be undefined or an empty object. |
I see. Thanks for your thoughts and the idea in general! |
With this change dotenv-flow's `.config()` method will start returning an error if there is no appropriate ".env*" files were found. Closes #41.
…found With this change dotenv-flow's `.config()` method will start returning an error if there is no appropriate ".env*" files. Closes #41.
Upon calling .config(), dotenv sets an error property in the returned object when .env is not present.
dotenv-flow does not set an error property, and instead it only has an empty "parsed" object.
It would be nice to have a consistent behavior as "dotenv"
The text was updated successfully, but these errors were encountered: