-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: support multi-line values for .env file
- Loading branch information
1 parent
89ddc98
commit 7089fd7
Showing
4 changed files
with
65 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,23 @@ RETAIN_INNER_QUOTES_AS_BACKTICKS=`{"foo": "bar's"}` | |
TRIM_SPACE_FROM_UNQUOTED= some spaced out string | ||
EMAIL=[email protected] | ||
SPACED_KEY = parsed | ||
|
||
MULTI_DOUBLE_QUOTED="THIS | ||
IS | ||
A | ||
MULTILINE | ||
STRING" | ||
|
||
MULTI_SINGLE_QUOTED='THIS | ||
IS | ||
A | ||
MULTILINE | ||
STRING' | ||
|
||
MULTI_BACKTICKED=`THIS | ||
IS | ||
A | ||
"MULTILINE'S" | ||
STRING` | ||
MULTI_NOT_VALID=THIS | ||
IS NOT MULTILINE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,8 @@ assert.strictEqual(process.env.TRIM_SPACE_FROM_UNQUOTED, 'some spaced out string | |
assert.strictEqual(process.env.EMAIL, '[email protected]'); | ||
// Parses keys and values surrounded by spaces | ||
assert.strictEqual(process.env.SPACED_KEY, 'parsed'); | ||
// Test multiple-line value | ||
assert.strictEqual(process.env.MULTI_DOUBLE_QUOTED, 'THIS\nIS\nA\nMULTILINE\nSTRING'); | ||
assert.strictEqual(process.env.MULTI_SINGLE_QUOTED, 'THIS\nIS\nA\nMULTILINE\nSTRING'); | ||
assert.strictEqual(process.env.MULTI_BACKTICKED, 'THIS\nIS\nA\n"MULTILINE\'S"\nSTRING'); | ||
assert.strictEqual(process.env.MULTI_NOT_VALID, 'THIS'); |