Skip to content

Commit b2c09c0

Browse files
committed
fix Windows tests
1 parent ec08570 commit b2c09c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/crawlfs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export async function determineFileType(filename: string): Promise<CrawledFileTy
2828
export async function crawl(dir: string, options: GlobOptionsWithFileTypesFalse) {
2929
const metadata: Record<string, CrawledFileType> = {};
3030
// TODO replace with `fs.glob`
31-
const crawled = await glob(dir, options);
31+
const crawled = await glob(dir, {
32+
windowsPathsNoEscape: true,
33+
...options,
34+
});
3235
const results = await Promise.all(
3336
crawled.sort().map(async (filename) => [filename, await determineFileType(filename)] as const),
3437
);

0 commit comments

Comments
 (0)