feat(gitService): 优化 Git 克隆命令并设置管理员权限
- 在 Git 克隆命令中添加 --single-branch 和 --depth 参数,以提高克隆速度和效率 - 在 package.json 中设置 Windows 平台的请求执行级别为管理员
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user