Skip to content

Commit

Permalink
Merge pull request #19 from Dcard/docker-skip-not-exist-cache
Browse files Browse the repository at this point in the history
fix(docker-build): Skip not existing cache files
  • Loading branch information
tommy351 authored Nov 10, 2021
2 parents 9e81ae2 + 89a7167 commit bafbf18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/docker-build/src/utils/copyCacheMarkedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default async function copyCacheMarkedFiles({
for (const src of cache.markedFiles) {
const path = ppath.relative(project.cwd, src);

report.reportInfo(null, path);
await xfs.copyPromise(ppath.join(destination, path), src);
if (await xfs.existsPromise(src)) {
report.reportInfo(null, path);
await xfs.copyPromise(ppath.join(destination, path), src);
}
}
}

0 comments on commit bafbf18

Please sign in to comment.