Skip to content

Commit

Permalink
Merge pull request #329 from joelvh/patch-1
Browse files Browse the repository at this point in the history
Update README with multi-line value improvements
  • Loading branch information
Andrew Nordman authored Apr 13, 2018
2 parents aaabca8 + 9dfcaa5 commit 447b94c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,21 @@ export SECRET_KEY=YOURSECRETKEYGOESHERE
If you need multiline variables, for example private keys, you can double quote strings and use the `\n` character for newlines:

```shell
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9\n-----END DSA PRIVATE KEY-----\n"
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9...\n-----END DSA PRIVATE KEY-----\n"
```

Alternatively, multi-line values with line breaks are now supported for quoted values.

```shell
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
HkVN9...
...
-----END DSA PRIVATE KEY-----"
```

This is particularly helpful when using the Heroku command line plugin [`heroku-config`](https://github.com/xavdid/heroku-config) to pull configuration variables down that may have line breaks.

### Command Substitution

You need to add the output of a command in one of your variables? Simply add it with `$(your_command)`:
Expand Down

0 comments on commit 447b94c

Please sign in to comment.