From 34d2b3157976d126f68196c0990ad925b064aa5a Mon Sep 17 00:00:00 2001 From: Memory <134070804+Memory2314@users.noreply.github.com> Date: Wed, 31 Dec 2025 20:26:04 +0800 Subject: [PATCH] fix: add force option to file copy to prevent first launch failures --- src/main/utils/init.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/utils/init.ts b/src/main/utils/init.ts index 22401eb..9236505 100644 --- a/src/main/utils/init.ts +++ b/src/main/utils/init.ts @@ -161,14 +161,14 @@ async function initFiles(): Promise { const shouldCopyToWork = !existsSync(targetPath) || (await isSourceNewer(sourcePath, targetPath)) if (shouldCopyToWork) { - await cp(sourcePath, targetPath, { recursive: true }) + await cp(sourcePath, targetPath, { recursive: true, force: true }) } } if (existsSync(sourcePath)) { const shouldCopyToTest = !existsSync(testTargetPath) || (await isSourceNewer(sourcePath, testTargetPath)) if (shouldCopyToTest) { - await cp(sourcePath, testTargetPath, { recursive: true }) + await cp(sourcePath, testTargetPath, { recursive: true, force: true }) } } } catch (error) {