diff options
Diffstat (limited to 'tools/eslint/node_modules/glob/common.js')
-rw-r--r-- | tools/eslint/node_modules/glob/common.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/eslint/node_modules/glob/common.js b/tools/eslint/node_modules/glob/common.js index 58dc41e663..66651bb3aa 100644 --- a/tools/eslint/node_modules/glob/common.js +++ b/tools/eslint/node_modules/glob/common.js @@ -80,6 +80,7 @@ function setopts (self, pattern, options) { self.nocase = !!options.nocase self.stat = !!options.stat self.noprocess = !!options.noprocess + self.absolute = !!options.absolute self.maxLength = options.maxLength || Infinity self.cache = options.cache || Object.create(null) @@ -102,7 +103,11 @@ function setopts (self, pattern, options) { if (process.platform === "win32") self.root = self.root.replace(/\\/g, "/") - self.cwdAbs = makeAbs(self, self.cwd) + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") self.nomount = !!options.nomount // disable comments and negation in Minimatch. |