Cannot create linux glob paths on windows machine even when specifying root dir #14
Open
Description
On windows machines, the following code:
toAbsoluteGlob("**/*.txt", { cwd: "/", root: "/" }))
Will output the following:
C:/**/*.txt
Expected: /**/*.txt
I'm thinking that perhaps the following:
if (rootDir) {
rootDir = unixify(rootDir);
if (process.platform === 'win32' || !isAbsolute(rootDir)) {
rootDir = unixify(path.resolve(rootDir));
}
}
Should maybe be changed to?
if (rootDir) {
rootDir = unixify(rootDir);
if (!isAbsolute(rootDir)) {
rootDir = unixify(path.resolve(rootDir));
}
}
Metadata
Assignees
Labels
No labels