Nicer handling of config file errors at startup

This commit is contained in:
Bryan Ashby 2020-06-18 21:29:24 -06:00
parent ce15511cf1
commit 20bbbd2f59
No known key found for this signature in database
GPG key ID: B49EB437951D2542
3 changed files with 15 additions and 4 deletions

View file

@ -48,7 +48,6 @@ exports.Config = class Config extends ConfigLoader {
systemConfigInstance = new Config(options);
systemConfigInstance.init(baseConfigPath, err => {
if (err) {
console.stdout(`Configuration ${baseConfigPath} error: ${err.message}`); // eslint-disable-line no-console
return cb(err);
}
@ -56,7 +55,7 @@ exports.Config = class Config extends ConfigLoader {
// instance we just created
exports.get = systemConfigInstance.get.bind(systemConfigInstance);
return cb(err);
return cb(null);
});
}