Skip to content

Commit

Permalink
fix(core): ensure output directory exists in compareReportFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Mar 19, 2024
1 parent 79c838e commit cf309bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/lib/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import {
Diff,
calcDuration,
ensureDirectoryExists,
generateMdReportsDiff,
readJsonFile,
scoreReport,
Expand Down Expand Up @@ -43,6 +44,7 @@ export async function compareReportFiles(
format.map(async fmt => {
const outputPath = join(outputDir, `${filename}-diff.${fmt}`);
const content = reportsDiffToFileContent(reportsDiff, fmt);
await ensureDirectoryExists(outputDir);
await writeFile(outputPath, content);
return outputPath;
}),
Expand Down

0 comments on commit cf309bc

Please sign in to comment.