-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added functionality to ignore .env # comments, trim EOL whitespace, detect different EOL terminators #6
Conversation
seanblonien
commented
Aug 16, 2021
•
edited
Loading
edited
- Valid .env file comments that start with #, so added functionality to ignore anything after that symbol
- Apparently dontenv doesn't even have this feature, but I figured couldn't hurt
- Also trimmed whitespace at end of line
- Changed it to auto-detect the EOL and split the string accordingly (allowing for \r\n and \n line endings)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice touch to the package, good work, thank you! :)
One small comment about the style, otherwise it looks good.
If someone needs an environment variable value with a "#" in it, this solution doesn't really allow for that, but I think that's fine and not a common use-case, and easily solvable by replacing a pre-defined character pattern (such as HASH and doing a |
@kHRISl33t any more feedback on this? |
@seanblonien will merge it later today (in a few hours), I just need to finish the docs for it :) |