renovate/lib/renovate.ts
Rhys Arkins 1914c187a6
fix: unhandledRejection (#9472)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2021-04-09 16:16:00 +02:00

21 lines
540 B
JavaScript

#!/usr/bin/env node
import { logger } from './logger';
import * as proxy from './proxy';
import * as globalWorker from './workers/global';
// istanbul ignore next
process.on('unhandledRejection', (err) => {
logger.error({ err }, 'unhandledRejection');
});
proxy.bootstrap();
// eslint-disable-next-line @typescript-eslint/no-floating-promises
(async (): Promise<void> => {
process.exitCode = await globalWorker.start();
// istanbul ignore if
if (process.env.RENOVATE_X_HARD_EXIT) {
process.exit(process.exitCode);
}
})();