Skip to content

Commit

Permalink
fix(ci): only copy merged-report-diff.md when paths are different
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Dec 16, 2024
1 parent 94b25f8 commit f8ac400
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ci/src/lib/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ export async function runInCI(
DEFAULT_PERSIST_OUTPUT_DIR,
path.basename(tmpDiffPath),
);
await fs.cp(tmpDiffPath, diffPath);
logger.debug(`Copied ${tmpDiffPath} to ${diffPath}`);
if (tmpDiffPath !== diffPath) {
await fs.cp(tmpDiffPath, diffPath);
logger.debug(`Copied ${tmpDiffPath} to ${diffPath}`);
}
const commentId = await commentOnPR(tmpDiffPath, api, logger);
return {
mode: 'monorepo',
Expand Down

0 comments on commit f8ac400

Please sign in to comment.