mirror of https://github.com/embarklabs/embark.git
fix getting .json config file
This commit is contained in:
parent
2793432b87
commit
b804f51de5
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue