From f8ac4007e854be205674621202b4966f29aa246e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Chalk?= Date: Fri, 6 Dec 2024 12:16:16 +0100 Subject: [PATCH] fix(ci): only copy merged-report-diff.md when paths are different --- packages/ci/src/lib/run.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ci/src/lib/run.ts b/packages/ci/src/lib/run.ts index 97979b189..8ef4f49e8 100644 --- a/packages/ci/src/lib/run.ts +++ b/packages/ci/src/lib/run.ts @@ -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',