Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
feat(kit): support followSymbolicLinks option for resolveFiles (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Diizzayy committed Aug 2, 2022
1 parent 94d0c08 commit 8efaad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async function isDirectory (path: string) {
return (await fsp.lstat(path)).isDirectory()
}

export async function resolveFiles (path: string, pattern: string | string[]) {
const files = await globby(pattern, { cwd: path, followSymbolicLinks: true })
export async function resolveFiles (path: string, pattern: string | string[], opts: { followSymbolicLinks?: boolean } = {}) {
const files = await globby(pattern, { cwd: path, followSymbolicLinks: opts.followSymbolicLinks ?? true })
return files.map(p => resolve(path, p)).filter(p => !isIgnored(p)).sort()
}

0 comments on commit 8efaad4

Please sign in to comment.