fix: Return non-zero exit code in any fatal error (#3621)

This commit is contained in:
mohd hassaan 2019-05-02 15:50:00 +05:30 committed by Rhys Arkins
parent 3faa3ece0f
commit 315f036e38

View file

@ -46,7 +46,8 @@ function initLogger() {
]; ];
logFunctions.forEach(x => { logFunctions.forEach(x => {
global.logger[x] = (p1, p2) => { global.logger[x] = (p1, p2) => {
global.renovateError = global.renovateError || x === 'error'; global.renovateError =
global.renovateError || x === 'error' || x === 'fatal';
if (p2) { if (p2) {
// meta and msg provided // meta and msg provided
return bunyanLogger[x]({ ...meta, ...p1 }, p2); return bunyanLogger[x]({ ...meta, ...p1 }, p2);