Skip to content

Commit

Permalink
[hulu#110] - support fast-glob for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-brixi-deltatre committed Nov 23, 2021
1 parent 43b8605 commit 2934b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ interface CliOptions {

async function findBrsFiles(sourceDir?: string) {
let searchDir = sourceDir || "source";
const pattern = path.join(process.cwd(), searchDir, "**", "*.brs");
const pattern = path
.join(process.cwd(), searchDir, "**", "*.brs")
.replace(/\\/g, "/");
return fastGlob(pattern);
}

Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function globMatchFiles(filePatterns: string[]) {
} else {
testsPattern += `{${parsedPatterns.join(",")}}`;
}

testsPattern = testsPattern.replace(/\\/g, "/");
// exclude node_modules from the test search
return fastGlob([testsPattern, `!${process.cwd()}/node_modules/**/*`]);
}

0 comments on commit 2934b30

Please sign in to comment.