Skip to content

Commit 3cc73ce

Browse files
fix: normalize glob matched paths
see isaacs/node-glob#419
1 parent 183de23 commit 3cc73ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ export function cacheClearableMemoize<T extends AnyFunction>(
3232
export function resolveRawEntry(entry: RawEntry): ResolvedEntry[] {
3333
const {from, to, options} = entry;
3434

35-
const srcs = glob.sync(from, {nodir: true, absolute: true});
35+
// absolute paths are separated by a forward slash in windows,
36+
// so we need to normalize them.
37+
// see https://github.com/isaacs/node-glob/issues/419
38+
const normalize = path.normalize.bind(path);
39+
const srcs = glob.sync(from, {nodir: true, absolute: true}).map(normalize);
3640

3741
return srcs.map((src) => {
3842
let dest: string;

0 commit comments

Comments
 (0)