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

WIP better emp env/env-load #1098

Closed
wants to merge 3 commits into from
Closed

WIP better emp env/env-load #1098

wants to merge 3 commits into from

Conversation

ejholmes
Copy link
Contributor

@ejholmes ejholmes commented Aug 1, 2017

Closes #1097.

This is an attempt to make $ emp env | emp env-load better. Previously, emp env did not quote the environment variable values, which means multiline environment variables would show up like this:

$ emp set BAR=bar
$ emp set FOO="foo1
foo2
foo3"
$ emp env
FOO=foo1
foo2
foo3
BAR=bar

This isn't easily parsed by shells, and isn't supported in the .env format. After this change, emp env produces quoted values:

$ emp env
FOO="foo1\nfoo2\nfoo3"
BAR="bar"

Which means it can be piped into emp env-load or exported in your shell (e.g. export $(emp env).

This probably needs more test cases for various scenarios. Also, quoting is potentially backwards incompatible, so maybe it should be behind a flag on emp env.

@ejholmes ejholmes closed this Dec 7, 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.

1 participant