-
Notifications
You must be signed in to change notification settings - Fork 510
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
Skip over non-envvar lines #285
Comments
For what it's worth, both Foreman (https://github.com/ddollar/foreman/blob/5f5502efed74c68f5cf381d38b2ad497676837ec/lib/foreman/env.rb#L8-L18) and honcho (https://github.com/nickstenning/honcho/blob/6bad0da2806231ac8f3a07d76847a566b96745e6/honcho/environ.py#L73-L99) implement the suggested behavior (skipping lines that don't set envvars). |
Is this something the maintainers would be willing to change? If so, I could work on a PR. |
Hey @sloria, thanks for the suggestion. I'm not opposed. My only concern is that it might lead to unexpected behavior for people that don't realize they have the format wrong, but I think I'm ok with that. Feel free to open a PR! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This makes dotenv play better with .env files that do more than just set variables, e.g. defining aliases and functions closes bkeepers#285
.env
files may contain lines that don't set environment variables. For example, I use autoenv in order to automatically activate the current project's Python virtual environment. I also set per-project aliases in.env
.dotenv
raises an error when it encounters lines that don't set envvars:Would the maintainer(s) be open to skipping these lines rather than raising an error?
The text was updated successfully, but these errors were encountered: