Skip to content

Commit

Permalink
Support Windows for resolve path (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 authored and sindresorhus committed Aug 2, 2017
1 parent f27adc6 commit d7cf3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = (pattern, options) => {
// If the path leaves the current working directory, then we need to
// resolve the absolute path so that the path can be properly matched
// by minimatch (via multimatch)
if (relPath.indexOf('../') === 0) {
if (/^\.\.[\\/]/.test(relPath)) {
relPath = path.resolve(relPath);
}

Expand Down

0 comments on commit d7cf3d4

Please sign in to comment.