Skip to content

Commit

Permalink
return null instead of false
Browse files Browse the repository at this point in the history
  • Loading branch information
brandenrodgers committed Dec 18, 2024
1 parent 10c30c4 commit d625070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down

0 comments on commit d625070

Please sign in to comment.