-
Notifications
You must be signed in to change notification settings - Fork 43
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
config:push with .env does not support multline #291
Comments
From @benwilber on September 19, 2015 19:27 @sstarcher can you show an example of a multiline env variable? from the dotenv docs, you can double-quote multiline strings and use literal
Or are you saying that this is what doesn't work? |
From @sstarcher on September 19, 2015 21:35 @benwilber it seems that deis config:pull was not double quoting the multiline string. |
From @sstarcher on September 19, 2015 23:48 I just tested adding a double quote to the .env file that was spit out by deis config:pull, it acts the same was as if no quotes exist and for each line of the multiline string it outputs the line and "does not match the pattern 'key=var', ex: MODE=test" When the same multiline with double quote is done on the command line it works correctly. |
From @benwilber on September 20, 2015 0:1 @sstarcher are you able to provide a couple quick examples of what you're seeing from |
From @sstarcher on September 20, 2015 0:42 When I refer to Deis I'm referring to the platform version installed. All of the below is using deis client 1.10.0 In Deis 1.10.0 On the command line the following has the expected result of setting a multiline variable. Although it does complain
After doing the above everything finishes correct, but when I do a deis config:pull or a deis config:list I don't see DERPY listed at all. This previously functioned with Deis 1.9.0. On my Deis 1.9.0 system I have working multi line variables that show up when doing a deis config:list, but when I try to add new one's using the deis client 1.10.0 it no longer works and the added variables don't show up in deis config:list A deis config:pull on the old platform produces
Which is not double quoted. |
From @sstarcher on September 20, 2015 1:37 If I downgrade the deis client to 1.9.0 deis config:set with a multiline variable works and deis config:list shows the multiline variable. If a multiline variable is set using deis client 1.9.0 and I do deis config:pull and deis config:push I get errors. If I go into the .env file that was created and quote the multline string it still does not function. |
From @Joshua-Anderson on September 20, 2015 2:30 This is a bug with the new go client. I didn't consider multi line variables when writing and they're not properly handled. You can see the file here. Allowing multi line variables with |
From @Joshua-Anderson on September 20, 2015 3:2 I fixed the
issue in #4513. I'm not sure what the best approach for solving multi line |
From @sstarcher on September 20, 2015 14:41 Could you take the naive approach and assume if you pass it through your regex and it does not match var=value than it goes with the previous variable? |
From @bacongobbler on June 18, 2016 6:39 this is still relevant for v2. I propose we should move to a more formal library such as https://github.com/joho/godotenv for parsing .env files. |
This issue was moved to teamhephy/workflow-cli#11 |
From @sstarcher on September 19, 2015 18:38
If you have an environment variable with multiple lines config:push fails for that specific environment variable.
Copied from original issue: deis/deis#4512
The text was updated successfully, but these errors were encountered: