Skip to content

Commit 1fa0581

Browse files
committed
Remove multiline from env and cli options
1 parent 55b649a commit 1fa0581

File tree

4 files changed

+1
-20
lines changed

4 files changed

+1
-20
lines changed

lib/cli-options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const re = /^dotenv_config_(encoding|path|debug|override|multiline)=(.+)$/
1+
const re = /^dotenv_config_(encoding|path|debug|override)=(.+)$/
22

33
module.exports = function optionMatcher (args) {
44
return args.reduce(function (acc, cur) {

lib/env-options.js

-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,4 @@ if (process.env.DOTENV_CONFIG_OVERRIDE != null) {
1717
options.override = process.env.DOTENV_CONFIG_OVERRIDE
1818
}
1919

20-
if (process.env.DOTENV_CONFIG_MULTILINE != null) {
21-
options.multiline = process.env.DOTENV_CONFIG_MULTILINE
22-
}
23-
2420
module.exports = options

tests/test-cli-options.js

-7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ const t = require('tap')
22

33
const options = require('../lib/cli-options')
44

5-
t.plan(7)
6-
75
// matches encoding option
86
t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_encoding=utf8']), {
97
encoding: 'utf8'
@@ -24,11 +22,6 @@ t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_override=
2422
override: 'true'
2523
})
2624

27-
// matches multiline option
28-
t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_multiline=true']), {
29-
multiline: 'true'
30-
})
31-
3225
// ignores empty values
3326
t.same(options(['node', '-e', "'console.log(testing)'", 'dotenv_config_path=']), {})
3427

tests/test-env-options.js

-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const e = process.env.DOTENV_CONFIG_ENCODING
99
const p = process.env.DOTENV_CONFIG_PATH
1010
const d = process.env.DOTENV_CONFIG_DEBUG
1111
const o = process.env.DOTENV_CONFIG_OVERRIDE
12-
const m = process.env.DOTENV_CONFIG_MULTILINE
1312

1413
// get fresh object for each test
1514
function options () {
@@ -26,14 +25,11 @@ function testOption (envVar, tmpVal, expect) {
2625
delete process.env[envVar]
2726
}
2827

29-
t.plan(6)
30-
3128
// returns empty object when no options set in process.env
3229
delete process.env.DOTENV_CONFIG_ENCODING
3330
delete process.env.DOTENV_CONFIG_PATH
3431
delete process.env.DOTENV_CONFIG_DEBUG
3532
delete process.env.DOTENV_CONFIG_OVERRIDE
36-
delete process.env.DOTENV_CONFIG_MULTILINE
3733

3834
t.same(options(), {})
3935

@@ -49,12 +45,8 @@ testOption('DOTENV_CONFIG_DEBUG', 'true', { debug: 'true' })
4945
// sets override option
5046
testOption('DOTENV_CONFIG_OVERRIDE', 'true', { override: 'true' })
5147

52-
// sets multiline option
53-
testOption('DOTENV_CONFIG_MULTILINE', 'true', { multiline: 'true' })
54-
5548
// restore existing env
5649
process.env.DOTENV_CONFIG_ENCODING = e
5750
process.env.DOTENV_CONFIG_PATH = p
5851
process.env.DOTENV_CONFIG_DEBUG = d
5952
process.env.DOTENV_CONFIG_OVERRIDE = o
60-
process.env.DOTENV_CONFIG_MULTILINE = m

0 commit comments

Comments
 (0)