-
Notifications
You must be signed in to change notification settings - Fork 145
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
Handle multiline strings in .env file #128
Comments
Honcho has supported this since v0.5.0: .env:
Procfile:
honcho output:
|
@nickstenning I did some testing, and the multiline string handling does not correctly match that of Foreman:
print: python -c "import os; print os.getenv('FOO')"
FOO="hello\nworld" Output from
Ouptut from
I've re-opened #129 which should fix this. |
Thanks for this. This is a regression in v0.6.5 introduced by the well-intentioned changes of 08063ea. I'll look into it. |
Thanks, I've updated the PR since there were conflicts. |
Ugh. Python 3 removed the bytestring-to-bytestring decoders that I used to fix this in 920b0b0. Watch this space... |
Holy mother of God. Making string_escape work across Python 2 and 3 is an absolute nightmare. The bytes-to-bytes encodes were removed in Python 3, so the only way to use them is to use unicode_escape directly from the codecs package, but this makes a complete hash of the task if you give it unicode: >>> codecs.decode('åéïò', 'unicode_escape') 'åéïò' >>> codecs.decode('åéïò'.encode('utf8'), 'unicode_escape') 'åéïò' WTF!? Anyway. Life is too short. This will make the tests pass. Fixes #128.
😆 |
see ddollar/foreman#250
Very useful for working with keys/certs loaded from environment variables.
The text was updated successfully, but these errors were encountered: