From b804f51de537c80f9e9f395347ace7b4ce9b9287 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 11 May 2018 18:22:03 -0400 Subject: [PATCH] fix getting .json config file --- lib/core/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/config.js b/lib/core/config.js index 5f2b0c2c..e23f444e 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -75,7 +75,7 @@ Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env, ena return configToReturn; } - if (!fs.existsSync(configFilePath + '.js') && !fs.existsSync(configFilePath + ' .json')) { + if (!fs.existsSync(configFilePath + '.js') && !fs.existsSync(configFilePath + '.json')) { // TODO: remove this if if (this.logger) { this.logger.warn(__("no config file found at %s using default config", configFilePath)); @@ -87,7 +87,7 @@ Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env, ena if (fs.existsSync(configFilePath + '.js')) { config = require(fs.dappPath(configFilePath + '.js')); } else { - config = fs.readJSONSync(configFilePath); + config = fs.readJSONSync(configFilePath + '.json'); } let configObject = utils.recursiveMerge(defaultConfig, config);