Skip to content

Commit 16f1343

Browse files
committed
fix: normalize win32 paths before globbing
1 parent 601244c commit 16f1343

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const packageMustHavesRE = new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$]
3131

3232
const fs = require('fs')
3333
const glob = require('glob')
34+
const globify = pattern => pattern.split('\\').join('/')
3435

3536
const pathHasPkg = (input) => {
3637
if (!input.startsWith('node_modules/')) {
@@ -428,7 +429,7 @@ class Walker extends IgnoreWalker {
428429
}
429430

430431
globFiles (pattern, cb) {
431-
glob(pattern, { dot: true, cwd: this.path, nocase: true }, cb)
432+
glob(globify(pattern), { dot: true, cwd: this.path, nocase: true }, cb)
432433
}
433434

434435
readPackageJson (entries) {

0 commit comments

Comments
 (0)