feat(gitService): 优化 Git 克隆命令并设置管理员权限

- 在 Git 克隆命令中添加 --single-branch 和 --depth 参数,以提高克隆速度和效率
- 在 package.json 中设置 Windows 平台的请求执行级别为管理员
This commit is contained in:
2025-08-13 23:55:38 +08:00
parent 512667b850
commit 68616fe75a
2 changed files with 2 additions and 1 deletions

View File

@@ -249,7 +249,7 @@ export async function cloneBackend(
})
}
await new Promise<void>((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,