fix(dev-infra): correct matching logic for g3 comparison (#39084)

Corrects the matching logic for g3 comparison check, previously more matches were
found than were correct.

PR Close #39084
This commit is contained in:
Joey Perrott 2020-10-01 10:53:07 -07:00
parent 4bce21358d
commit f7213cb57a
1 changed files with 1 additions and 1 deletions

View File

@ -119,6 +119,6 @@ export async function printG3Comparison(git: GitClient) {
/** Determine whether the file name passes both include and exclude checks. */
function checkMatchAgainstIncludeAndExclude(
file: string, includes: string[], excludes: string[]) {
return multimatch(multimatch(file, includes), excludes, {flipNegate: true}).length !== 0;
return multimatch(file, includes).length >= 1 && multimatch(file, excludes).length === 0;
}
}