-
-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DOTENV_KEY to cli config and environment config options
- Loading branch information
Showing
4 changed files
with
18 additions
and
2 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
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ const e = process.env.DOTENV_CONFIG_ENCODING | |
const p = process.env.DOTENV_CONFIG_PATH | ||
const d = process.env.DOTENV_CONFIG_DEBUG | ||
const o = process.env.DOTENV_CONFIG_OVERRIDE | ||
const dk = process.env.DOTENV_CONFIG_DOTENV_KEY | ||
|
||
// get fresh object for each test | ||
function options () { | ||
|
@@ -30,6 +31,7 @@ delete process.env.DOTENV_CONFIG_ENCODING | |
delete process.env.DOTENV_CONFIG_PATH | ||
delete process.env.DOTENV_CONFIG_DEBUG | ||
delete process.env.DOTENV_CONFIG_OVERRIDE | ||
delete process.env.DOTENV_CONFIG_DOTENV_KEY | ||
|
||
t.same(options(), {}) | ||
|
||
|
@@ -45,8 +47,12 @@ testOption('DOTENV_CONFIG_DEBUG', 'true', { debug: 'true' }) | |
// sets override option | ||
testOption('DOTENV_CONFIG_OVERRIDE', 'true', { override: 'true' }) | ||
|
||
// sets DOTENV_KEY option | ||
testOption('DOTENV_CONFIG_DOTENV_KEY', 'dotenv://:[email protected]/vault/.env.vault?environment=development', { DOTENV_KEY: 'dotenv://:[email protected]/vault/.env.vault?environment=development' }) | ||
|
||
// restore existing env | ||
process.env.DOTENV_CONFIG_ENCODING = e | ||
process.env.DOTENV_CONFIG_PATH = p | ||
process.env.DOTENV_CONFIG_DEBUG = d | ||
process.env.DOTENV_CONFIG_OVERRIDE = o | ||
process.env.DOTENV_CONFIG_DOTENV_KEY = dk |