Skip to content

Commit

Permalink
fix: windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev authored Jul 17, 2024
1 parent 57a372b commit e5ea6d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,13 @@ const normalizeOptions = async (
}

if (Array.isArray(entry)) {
const matcher = picomatch(entry)
options.entry = await new fdir()
const matcher = picomatch(entry, { windows: true })
const entries = await new fdir()
.withRelativePaths()
.filter((file) => matcher(file))
.crawl(process.cwd())
.withPromise()
options.entry = entries.map((f) => f.replaceAll(/\\/g, '/'))
// Ensure entry exists
if (!options.entry || options.entry.length === 0) {
throw new PrettyError(`Cannot find ${entry}`)
Expand Down

0 comments on commit e5ea6d3

Please sign in to comment.