Skip to content

Commit 7f16b09

Browse files
committed
scan module don't need cwd
1 parent da4bd1e commit 7f16b09

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/scan.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ var path = require('path')
55
var filter = require('patterns')([/^\./, /\/\./])
66
var debug = require('./debug')
77

8-
module.exports = function (cwd, dir) {
9-
if (!dir) dir = cwd
8+
module.exports = function (dir) {
109
dir = path.resolve(dir)
1110

1211
if (filter.match(dir)) {
@@ -21,7 +20,7 @@ module.exports = function (cwd, dir) {
2120
if (~content.indexOf('.git')) return [dir]
2221

2322
return content.map(joinPathWith(dir)).filter(isDir).reduce(function (result, dir) {
24-
return result.concat(module.exports(cwd, dir))
23+
return result.concat(module.exports(dir))
2524
}, [])
2625
}
2726

0 commit comments

Comments
 (0)