diff --git a/src/utils.ts b/src/utils.ts index 79dd8825149..e645f93df05 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -171,14 +171,14 @@ async function* lineOfFileGenerator({ input: fileStream, crlfDelay: Infinity }) - for await (const line of rl) { + for await (let line of rl) { if (!line.startsWith('#') && line !== '') { if (excludedFiles) { - if (line.startsWith('!')) { - yield line - } else { - yield `!${line}` + line = line.startsWith('!') ? line : `!${line}` + if (line.endsWith(path.sep)) { + line = `${line}${path.sep}**` } + yield line } else { yield line } @@ -1032,6 +1032,9 @@ export const getFilePatterns = async ({ if (!p.startsWith('!')) { p = `!${p}` } + if (p.endsWith(path.sep)) { + p = `${p}${path.sep}**` + } return p })