@@ -23,6 +23,7 @@ var Theme = require('../theme');
2323var Locals = require ( './locals' ) ;
2424var defaultConfig = require ( './default_config' ) ;
2525var loadDatabase = require ( './load_database' ) ;
26+ var multiConfigPath = require ( './multi_config_path' ) ;
2627
2728var libDir = pathFn . dirname ( __dirname ) ;
2829var sep = pathFn . sep ;
@@ -31,6 +32,8 @@ var dbVersion = 1;
3132function Hexo ( base , args ) {
3233 base = base || process . cwd ( ) ;
3334 args = args || { } ;
35+
36+ var mcp = new multiConfigPath ( this ) ;
3437
3538 EventEmitter . call ( this ) ;
3639
@@ -53,10 +56,6 @@ function Hexo(base, args) {
5356 init : false
5457 } ;
5558
56- var multiConfigPath = require ( './multi_config_path' ) ( this ) ;
57- this . config_path = args . config ? multiConfigPath ( base , args . config )
58- : pathFn . join ( base , '_config.yml' ) ;
59-
6059 this . extend = {
6160 console : new extend . Console ( ) ,
6261 deployer : new extend . Deployer ( ) ,
@@ -90,6 +89,9 @@ function Hexo(base, args) {
9089 path : pathFn . join ( base , 'db.json' )
9190 } ) ;
9291
92+ this . config_path = args . config ? mcp ( base , args . config )
93+ : pathFn . join ( base , '_config.yml' ) ;
94+
9395 registerModels ( this ) ;
9496
9597 this . source = new Source ( this ) ;
0 commit comments