bugfix for glob exclude patterns (#100)

Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
Brian DeHamer
2024-07-09 07:55:19 -07:00
committed by GitHub
parent 7fc0e943d8
commit 68a047fd01
3 changed files with 29 additions and 12 deletions
+3 -6
View File
@@ -56,16 +56,13 @@ const getSubjectFromPath = async (
subjectName?: string
): Promise<Subject[]> => {
const digestedSubjects: Subject[] = []
const files: string[] = []
// Parse the list of subject paths
const subjectPaths = parseList(subjectPath)
const subjectPaths = parseList(subjectPath).join('\n')
// Expand the globbed paths to a list of files
for (const subPath of subjectPaths) {
/* eslint-disable-next-line github/no-then */
files.push(...(await glob.create(subPath).then(async g => g.glob())))
}
/* eslint-disable-next-line github/no-then */
const files = await glob.create(subjectPaths).then(async g => g.glob())
if (files.length > MAX_SUBJECT_COUNT) {
throw new Error(