Permalink
Browse files

fix bad args passed to path.resolve

In node 0.10 path.resolve only accepts string parameters but {array}.map
passes the array index and the array itself as additional parameters.

Make sure path.resolve only gets string parameters.

fix #70
  • Loading branch information...
1 parent a0007cb commit 7b000bef3a664c6fe8755adb678f4ef6a629e602 @cioddi cioddi committed with isaacs Mar 25, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/tap-runner.js
View
@@ -116,7 +116,9 @@ Runner.prototype.runDir = function (dir, cb) {
files = files.filter(function(f) {
return !f.match(/^\./)
})
- files = files.map(path.resolve.bind(path, dir))
+ files = files.map(function(file) {
+ return path.resolve(dir, file)
+ })
self.runFiles(files, path.resolve(dir), cb)
})

0 comments on commit 7b000be

Please sign in to comment.