Skip to content
Snippets Groups Projects
Unverified Commit 2f87b53c authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix(worker): early exit if config can't parsed (#7884)

parent 95577ac0
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ function haveReachedLimits(): boolean { ...@@ -43,7 +43,7 @@ function haveReachedLimits(): boolean {
return false; return false;
} }
export async function start(): Promise<0 | 1> { export async function start(): Promise<number> {
let config: RenovateConfig; let config: RenovateConfig;
try { try {
// read global config from file, env and cli args // read global config from file, env and cli args
...@@ -73,6 +73,11 @@ export async function start(): Promise<0 | 1> { ...@@ -73,6 +73,11 @@ export async function start(): Promise<0 | 1> {
} else { } else {
logger.fatal({ err }, `Fatal error: ${String(err.message)}`); logger.fatal({ err }, `Fatal error: ${String(err.message)}`);
} }
if (!config) {
// return early if we can't parse config options
logger.debug(`Missing config`);
return 2;
}
} finally { } finally {
globalFinalize(config); globalFinalize(config);
logger.debug(`Renovate exiting`); logger.debug(`Renovate exiting`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment