Exit server process on config.yaml read errors

This commit is contained in:
Cohee 2024-08-26 11:06:30 +03:00
parent 8be21fc5c4
commit ff834efde3

View File

@ -34,8 +34,9 @@ function getConfig() {
CACHED_CONFIG = config;
return config;
} catch (error) {
console.warn('Failed to read config.yaml');
return {};
console.error(color.red('FATAL: Failed to read config.yaml. Please check the file for syntax errors.'));
console.error(error.message);
process.exit(1);
}
}