Fix path issues in Windows

This commit is contained in:
Rafael Oleza
2019-05-21 12:34:42 +02:00
parent 73e2b6033a
commit 4f9bd50ace

View File

@@ -258,6 +258,10 @@ module.exports = class RipgrepDirectorySearcher {
const output = []
for (let pattern of globs) {
// we need to replace path separators by slashes since globs should
// always use always slashes as path separators.
pattern = pattern.replace(new RegExp(`\\${path.sep}`, 'g'), '/')
if (pattern.length === 0) {
continue
}