Skip to content

Commit c559fc3

Browse files
committed
fix: ts warning
1 parent 0d70e98 commit c559fc3

1 file changed

Lines changed: 4 additions & 22 deletions

File tree

src/git/fetch-source.ts

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -302,28 +302,10 @@ const cloneOrUpdateRepo = async (params: FetchParams, outDir: string) => {
302302

303303
const cacheUrl = pathToFileURL(cachePath).href;
304304
localCloneArgs.push(cacheUrl, outDir);
305-
let allowLocalFilter = true;
306-
if (allowLocalFilter) {
307-
localCloneArgs.splice(2, 0, "--filter=blob:none");
308-
}
309-
try {
310-
await git(localCloneArgs, {
311-
timeoutMs: params.timeoutMs,
312-
allowFileProtocol: true,
313-
});
314-
} catch (error) {
315-
if (!allowLocalFilter || !isFilterUnsupported(error)) {
316-
throw error;
317-
}
318-
allowLocalFilter = false;
319-
const fallbackArgs = localCloneArgs.filter(
320-
(arg) => arg !== "--filter=blob:none",
321-
);
322-
await git(fallbackArgs, {
323-
timeoutMs: params.timeoutMs,
324-
allowFileProtocol: true,
325-
});
326-
}
305+
await git(localCloneArgs, {
306+
timeoutMs: params.timeoutMs,
307+
allowFileProtocol: true,
308+
});
327309

328310
if (useSparse) {
329311
const sparsePaths = extractSparsePaths(params.include);

0 commit comments

Comments
 (0)