Skip to content

Commit

Permalink
Testing JSON parse
Browse files Browse the repository at this point in the history
  • Loading branch information
nbhoski committed May 21, 2024
1 parent 2cb93d8 commit cef54c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/buildSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ interface TaskList {
}

export async function readJsonFile(filePath: string): Promise<TaskList> {
try {
const data = await readFileAsync(filePath, { encoding: 'utf8' });
return JSON.parse(data);
} catch (error) {
console.error('Error reading the JSON file:', error);
throw error;
}
}

export function addBuildSummaryTable(tasks: TaskList): void {
Expand Down

0 comments on commit cef54c7

Please sign in to comment.