From 89a71671514b49606b20db52a71a5f3786e92fca Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Wed, 10 Nov 2021 17:43:38 +0800 Subject: [PATCH] fix(docker-build): Skip not existing cache files --- packages/docker-build/src/utils/copyCacheMarkedFiles.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/docker-build/src/utils/copyCacheMarkedFiles.ts b/packages/docker-build/src/utils/copyCacheMarkedFiles.ts index 9691f60..afd0a18 100644 --- a/packages/docker-build/src/utils/copyCacheMarkedFiles.ts +++ b/packages/docker-build/src/utils/copyCacheMarkedFiles.ts @@ -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); + } } }