From 68616fe75a851e0295cfb4876163ad8ea19e10bd Mon Sep 17 00:00:00 2001 From: AoXuan Date: Wed, 13 Aug 2025 23:55:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(gitService):=20=E4=BC=98=E5=8C=96=20Git=20?= =?UTF-8?q?=E5=85=8B=E9=9A=86=E5=91=BD=E4=BB=A4=E5=B9=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Git 克隆命令中添加 --single-branch 和 --depth 参数,以提高克隆速度和效率 - 在 package.json 中设置 Windows 平台的请求执行级别为管理员 --- frontend/electron/services/gitService.ts | 2 +- frontend/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/electron/services/gitService.ts b/frontend/electron/services/gitService.ts index 91953cc..03082fd 100644 --- a/frontend/electron/services/gitService.ts +++ b/frontend/electron/services/gitService.ts @@ -249,7 +249,7 @@ export async function cloneBackend( }) } await new Promise((resolve, reject) => { - const proc = spawn(gitPath, ['clone', '--progress', '--verbose','--branch', 'feature/refactor-backend', repoUrl, tmpDir], { + const proc = spawn(gitPath, ['clone', '--progress', '--verbose','--single-branch','--depth','1','--branch', 'feature/refactor-backend', repoUrl, tmpDir], { stdio: 'pipe', env: gitEnv, cwd: appRoot, diff --git a/frontend/package.json b/frontend/package.json index c0885bd..4d0a36e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -23,6 +23,7 @@ "buildResources": "assets" }, "win": { + "requestedExecutionLevel": "requireAdministrator", "icon": "public/AUTO_MAA.ico" }, "mac": {