diff --git a/lib/cli-options.js b/lib/cli-options.js index ebffa6e3..b5012a89 100644 --- a/lib/cli-options.js +++ b/lib/cli-options.js @@ -1,4 +1,4 @@ -const re = /^dotenv_config_(encoding|path|debug|override|multiline)=(.+)$/ +const re = /^dotenv_config_(encoding|path|debug|override)=(.+)$/ module.exports = function optionMatcher (args) { return args.reduce(function (acc, cur) { diff --git a/lib/env-options.js b/lib/env-options.js index 16aaab29..64e2db7b 100644 --- a/lib/env-options.js +++ b/lib/env-options.js @@ -17,8 +17,4 @@ if (process.env.DOTENV_CONFIG_OVERRIDE != null) { options.override = process.env.DOTENV_CONFIG_OVERRIDE } -if (process.env.DOTENV_CONFIG_MULTILINE != null) { - options.multiline = process.env.DOTENV_CONFIG_MULTILINE -} - module.exports = options diff --git a/tests/test-cli-options.js b/tests/test-cli-options.js index 4d9f7318..5a4a4d52 100644 --- a/tests/test-cli-options.js +++ b/tests/test-cli-options.js @@ -2,8 +2,6 @@ const t = require('tap') const options = require('../lib/cli-options') -t.plan(7) - // matches encoding option t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_encoding=utf8']), { encoding: 'utf8' @@ -24,11 +22,6 @@ t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_override= override: 'true' }) -// matches multiline option -t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_multiline=true']), { - multiline: 'true' -}) - // ignores empty values t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_path=']), {}) diff --git a/tests/test-env-options.js b/tests/test-env-options.js index 466d3c8a..cb6cacf5 100644 --- a/tests/test-env-options.js +++ b/tests/test-env-options.js @@ -9,7 +9,6 @@ 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 m = process.env.DOTENV_CONFIG_MULTILINE // get fresh object for each test function options () { @@ -26,14 +25,11 @@ function testOption (envVar, tmpVal, expect) { delete process.env[envVar] } -t.plan(6) - // returns empty object when no options set in process.env 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_MULTILINE t.same(options(), {}) @@ -49,12 +45,8 @@ testOption('DOTENV_CONFIG_DEBUG', 'true', { debug: 'true' }) // sets override option testOption('DOTENV_CONFIG_OVERRIDE', 'true', { override: 'true' }) -// sets multiline option -testOption('DOTENV_CONFIG_MULTILINE', 'true', { multiline: 'true' }) - // 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_MULTILINE = m