From 8962947baa1a1ce7681ca2f20b5f492572a710eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Horro=20Pita?= Date: Fri, 30 Dec 2016 12:57:11 +0100 Subject: [PATCH] fix issue #241: no required properties in config file --- lib/infrastructure/configurationManager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/infrastructure/configurationManager.js b/lib/infrastructure/configurationManager.js index 134f378..41e2d4b 100644 --- a/lib/infrastructure/configurationManager.js +++ b/lib/infrastructure/configurationManager.js @@ -41,7 +41,7 @@ module.exports = function ConfigurationManager() { self.config.public = self.config.public || {}; - self.config.public.registryFile = getRelativeFilePath(configFile.public.registryFile || './bowerRepositoryPublic.json'); + self.config.public.registryFile = getRelativeFilePath(configFile.public && configFile.public.registryFile || './bowerRepositoryPublic.json'); self.config.public.registry = self.config.public.registry || 'https://bower.herokuapp.com/packages'; self.config.public.whitelist = self.config.public.whitelist || []; @@ -51,6 +51,7 @@ module.exports = function ConfigurationManager() { self.config.public.blacklist.enabled = !!self.config.public.blacklist.length; self.config.repoCacheOptions = {}; + self.config.repositoryCache = self.config.repositoryCache || {}; if(self.config.repositoryCache.svn && self.config.repositoryCache.svn.enabled) { self.config.repoCacheOptions.svn = {