diff --git a/lib/core/config.js b/lib/core/config.js index 32669777e..185080571 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -65,13 +65,16 @@ Config.prototype.reloadConfig = function() { Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) { if (!configFilePath) { - let configToReturn = defaultConfig['default'] || {} + let configToReturn = defaultConfig['default'] || {}; configToReturn.enabled = false; return configToReturn; } if (!fs.existsSync(configFilePath)) { - this.logger.warn("no config file found at " + configFilePath + ". using default config"); + // TODO: remove this if + if (this.logger) { + this.logger.warn("no config file found at " + configFilePath + ". using default config"); + } return defaultConfig['default'] || {}; } @@ -86,10 +89,10 @@ Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) { }; Config.prototype._getFileOrOject = function(object, filePath, property) { - if (typeof(this.configDir) === 'object') { + if (typeof (this.configDir) === 'object') { return this.configDir[property]; } - return this.configDir + filepath; + return this.configDir + filePath; }; Config.prototype.loadBlockchainConfigFile = function() { @@ -106,7 +109,7 @@ Config.prototype.loadContractsConfigFile = function() { var defaultVersions = { "web3.js": "1.0.0-beta", "solc": "0.4.17" - } + }; var versions = utils.recursiveMerge(defaultVersions, this.embarkConfig.versions || {}); var configObject = {