From 5fed6d1cdbeb09cf4507352e4f6a9967f8a00a6c Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Sun, 19 Nov 2023 11:52:25 +0100 Subject: [PATCH] fix: Revert "feat(config-validator): throw an error when the config cannot be found" (#25861) --- lib/config-validator.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/config-validator.ts b/lib/config-validator.ts index 759773321d..2436b8a8ab 100644 --- a/lib/config-validator.ts +++ b/lib/config-validator.ts @@ -15,7 +15,6 @@ import { } from './workers/global/config/parse/file'; let returnVal = 0; -let isFoundConfigFile = false; async function validate( desc: string, @@ -23,8 +22,6 @@ async function validate( strict: boolean, isPreset = false, ): Promise { - isFoundConfigFile = true; - const { isMigrated, migratedConfig } = migrateConfig(config); if (isMigrated) { logger.warn( @@ -137,11 +134,7 @@ type PackageJson = { const file = process.env.RENOVATE_CONFIG_FILE ?? 'config.js'; logger.info(`Validating ${file}`); try { - await validate( - file, - fileConfig, - strict && !!process.env.RENOVATE_CONFIG_FILE, - ); + await validate(file, fileConfig, strict); } catch (err) { logger.error({ file, err }, 'File is not valid Renovate config'); returnVal = 1; @@ -151,12 +144,6 @@ type PackageJson = { // ignore } } - - if (!isFoundConfigFile) { - logger.error('No configuration files found.'); - process.exit(1); - } - if (returnVal !== 0) { process.exit(returnVal); }