cleanup authheader usage

This commit is contained in:
msukkari 2025-09-27 15:59:48 -07:00
parent c40576d0a5
commit c5a921fff5

View file

@ -26,25 +26,12 @@ export const cloneRepository = async (
path,
})
if (authHeader) {
await git.clone(
cloneUrl,
path,
[
"--bare",
"-c",
`http.extraHeader=${authHeader}`,
]
)
} else {
await git.clone(
cloneUrl,
path,
[
"--bare",
]
)
}
const cloneArgs = [
"--bare",
...(authHeader ? ["-c", `http.extraHeader=${authHeader}`] : [])
];
await git.clone(cloneUrl, path, cloneArgs);
await unsetGitConfig(path, ["remote.origin.url"]);
} catch (error: unknown) {