diff --git a/lib/validation.ts b/lib/validation.ts index 300aa85a8..8d56e4c8b 100644 --- a/lib/validation.ts +++ b/lib/validation.ts @@ -201,9 +201,9 @@ export function fileExists(_path: string): boolean { return true; } -export function checkAndConvertToJson(_path: string): object | boolean | null { +export function checkAndConvertToJson(_path: string): object | null { const filePath = getAbsoluteFilePath(_path); - if (!fileExists(filePath)) return false; + if (!fileExists(filePath)) return null; if (getExt(_path) !== 'json') { logger.error(`The file "${_path}" must be a valid JSON file`);