Skip to content

Commit 7a4f9e7

Browse files
committed
remove "defaulted"
1 parent ac5c794 commit 7a4f9e7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ function parse (args, opts) {
4646
counts: {},
4747
normalize: {},
4848
configs: {},
49-
defaulted: {},
5049
nargs: {},
5150
coercions: {},
5251
keys: []
@@ -550,7 +549,7 @@ function parse (args, opts) {
550549
} else {
551550
// setting arguments via CLI takes precedence over
552551
// values within the config file.
553-
if (!hasKey(argv, fullKey.split('.')) || (flags.defaulted[fullKey]) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
552+
if (!hasKey(argv, fullKey.split('.')) || (flags.arrays[fullKey] && configuration['combine-arrays'])) {
554553
setArg(fullKey, value)
555554
}
556555
}
@@ -579,7 +578,7 @@ function parse (args, opts) {
579578
return camelCase(key)
580579
})
581580

582-
if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && (!hasKey(argv, keys) || flags.defaulted[keys.join('.')])) {
581+
if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) {
583582
setArg(keys.join('.'), process.env[envVar])
584583
}
585584
}

0 commit comments

Comments
 (0)