Skip to content
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

Rethink writing of double quotes around value to in flatten_and_write #15

Closed
theskumar opened this issue Nov 4, 2015 · 6 comments
Closed

Comments

@theskumar
Copy link
Owner

See #13

@tino
Copy link

tino commented Nov 4, 2015

Yeah, they do make sense. The problem was that the tool loading the environment variables (not with python-dotenv) was tripping upon them. But I guess I better fix that tool :)

@hugochinchilla
Copy link
Contributor

I use this library to mantain my dotenv files across a number of projects, but I have a problem with Docker and it's that for Docker an envfile gets parsed as if you split the lines by the equal sign, everything before the equal is the variable name, the rest is the value, the problem is that you end up with quotes in your values which breaks some applications.

I guess changing the behavior by default could be a breaking change, maybe a good compromise is to support a flag to set the behavior:

 --quote=always (current behavior)
 --quote=never (never add quotes)
 --quote=auto (only add quotes for values containing spaces)

I would add the "auto" behavior to support sourcing dotenv files from bash, i use this a lot while debugging, the problem with unquoted strings containing whitespace is that bash thinks you are trying to run a command.

theskumar added a commit that referenced this issue Mar 16, 2016
Support for configurable quoting mode, references #15
@theskumar
Copy link
Owner Author

Just released 0.4.0 with this functionality. 🎉

@hugochinchilla are you able to install the new version and confirm it works for you. Thanks.

@hugochinchilla
Copy link
Contributor

Works amazingly, thank you for merging so fast.

@theskumar
Copy link
Owner Author

Released 0.6.0 containing this change is on PYPI. Yay!

@hugochinchilla
Copy link
Contributor

@theskumar I think you wanted to post your last comment on PR #30 ;)

Thanks for merging :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants