Skip to content

Commit 7a8230e

Browse files
committed
Removing extend from cli-utils
1 parent 3b25fda commit 7a8230e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/lib/cli-utils.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const fs = require('fs-extra')
2-
const extend = require('extend')
32
const { cyan, bold } = require('colorette')
43
const { URL } = require('url')
54
const LDP = require('../../lib/ldp')
@@ -28,17 +27,18 @@ function getAccountManager (config, options = {}) {
2827
}
2928

3029
function loadConfig (program, options) {
31-
let argv = extend({}, options, { version: program.version() })
30+
let argv = {
31+
...options,
32+
version: program.version()
33+
}
3234
let configFile = argv['configFile'] || './config.json'
3335

3436
try {
3537
const file = fs.readFileSync(configFile)
3638

3739
// Use flags with priority over config file
3840
const config = JSON.parse(file)
39-
Object.keys(config).forEach((option) => {
40-
argv[option] = argv[option] || config[option]
41-
})
41+
argv = { ...config, ...argv }
4242
} catch (err) {
4343
// No file exists, not a problem
4444
console.log(cyan(bold('TIP')), 'create a config.json: `$ solid init`')

0 commit comments

Comments
 (0)