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

Quote environment variables. #150

Merged
merged 2 commits into from
Sep 28, 2018
Merged

Conversation

jmcarp
Copy link
Contributor

@jmcarp jmcarp commented Sep 28, 2018

Fixes dotenv export for variables with newlines and other special
characters.

Escape helper borrowed from https://github.com/joho/godotenv/blob/master/godotenv.go (MIT licensed).

Fixes dotenv export for variables with newlines and other special
characters.
@jmcarp
Copy link
Contributor Author

jmcarp commented Sep 28, 2018

cc @nickatsegment @systemizer

@nickatsegment
Copy link
Contributor

Looks like a good idea to me. It'd be cool if you could accompany this with tests showing a few pathological examples and how this fixes them.

@jmcarp
Copy link
Contributor Author

jmcarp commented Sep 28, 2018

Added tests.

Copy link
Contributor

@nickatsegment nickatsegment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nickatsegment nickatsegment merged commit 28b12a8 into segmentio:master Sep 28, 2018
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

Successfully merging this pull request may close these issues.

2 participants