We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c40576d commit c5a921fCopy full SHA for c5a921f
packages/backend/src/git.ts
@@ -26,25 +26,12 @@ export const cloneRepository = async (
26
path,
27
})
28
29
- if (authHeader) {
30
- await git.clone(
31
- cloneUrl,
32
- path,
33
- [
34
- "--bare",
35
- "-c",
36
- `http.extraHeader=${authHeader}`,
37
- ]
38
- )
39
- } else {
40
41
42
43
44
45
46
47
- }
+ const cloneArgs = [
+ "--bare",
+ ...(authHeader ? ["-c", `http.extraHeader=${authHeader}`] : [])
+ ];
+
+ await git.clone(cloneUrl, path, cloneArgs);
48
49
await unsetGitConfig(path, ["remote.origin.url"]);
50
} catch (error: unknown) {
0 commit comments