File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11const fs = require ( 'fs-extra' )
2- const extend = require ( 'extend' )
32const { cyan, bold } = require ( 'colorette' )
43const { URL } = require ( 'url' )
54const LDP = require ( '../../lib/ldp' )
@@ -28,17 +27,18 @@ function getAccountManager (config, options = {}) {
2827}
2928
3029function 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`' )
You can’t perform that action at this time.
0 commit comments