ignore missing config file, but throw other errors

This commit is contained in:
Thomas Ruoff
2016-03-01 23:37:55 +01:00
parent a2a47cdf8d
commit 3b0ee78cf4

View File

@@ -11,6 +11,9 @@ let config = Object.assign({}, defaults);
try { try {
config = Object.assign(config, require(configPath)); config = Object.assign(config, require(configPath));
} catch(err) { } catch(err) {
if (err.code !== 'MODULE_NOT_FOUND') {
throw err;
}
// No config found in "${configPath}". Using defaults... // No config found in "${configPath}". Using defaults...
} }