fix: adjust glob logic to always resolve glob relative to base

closes #4822
pull/4827/head
Divyansh Singh 3 months ago
parent f8260a4007
commit 5d41785ff7

@ -16,7 +16,9 @@ export function normalizeGlob(
if (!patterns) return []
if (typeof patterns === 'string') patterns = [patterns]
return patterns.map((p) =>
p.startsWith('.') ? normalizePath(path.resolve(base, p)) : normalizePath(p)
p[0] === '!'
? '!' + normalizePath(path.resolve(base, p.slice(1)))
: normalizePath(path.resolve(base, p))
)
}

Loading…
Cancel
Save