Skip to content

Commit acd9eef

Browse files
committed
fixup!
1 parent f739149 commit acd9eef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/generators/legacy-html/utils/safeCopy.mjs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ export async function safeCopy(srcDir, targetDir) {
2323
const sourcePath = join(srcDir, file);
2424
const targetPath = join(targetDir, file);
2525

26-
const [sStat, tStat] = await Promise.allSettled([
26+
const [sStat, tStat] = await Promise.all([
2727
stat(sourcePath),
2828
stat(targetPath),
29-
]);
29+
]).catch(() => []);
3030

31-
const shouldWrite =
32-
tStat.status === 'rejected' ||
33-
sStat.value.size !== tStat.value.size ||
31+
const shouldWrite = !tStat;
32+
sStat.value.size !== tStat.value.size ||
3433
sStat.value.mtimeMs > tStat.value.mtimeMs;
3534

3635
if (!shouldWrite) {

0 commit comments

Comments
 (0)