Match dotfiles
This commit is contained in:
parent
76a17c4221
commit
31833a9f47
2 changed files with 4 additions and 1 deletions
|
|
@ -6,5 +6,6 @@ describe("globsToRegexes", () => {
|
|||
const regex = globsToRegexes([".git/**"], new Logger())[0];
|
||||
|
||||
expect(regex.test(".git/objects/object")).toBeTruthy();
|
||||
expect(regex.test(".git/objects/.object")).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ import { Logger } from "../tracing/logger";
|
|||
export function globsToRegexes(globs: string[], logger: Logger): RegExp[] {
|
||||
return globs
|
||||
.map((pattern) => {
|
||||
const result = makeRe(pattern);
|
||||
const result = makeRe(pattern, {
|
||||
dot: true
|
||||
});
|
||||
if (result === false) {
|
||||
logger.warn(
|
||||
`Failed to parse ${pattern}' as a glob pattern, skipping it`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue