Skip to content

Commit

Permalink
Fix bug with multiple file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Jul 18, 2016
1 parent 5dfaa4a commit 7722bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/globber.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ function globber(paths) {
files.fileEvents = [];

const Glob = glob.Glob;
let doneCount = 0;

paths.forEach(function (path) {
console.log("Rampaging " + path);
const fileEvents = new Glob(path);

fileEvents.on('match', function (file) {
files.onNext(file);
});

fileEvents.on('end', function () {
files.onCompleted();
if (++doneCount === paths.length) {
files.onCompleted();
}
});

files.fileEvents.push(fileEvents);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "test262-harness",
"repository": "bterlson/test262-harness",
"version": "2.0.3",
"version": "2.0.4",
"description": "Node-based harness for test262",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit 7722bc4

Please sign in to comment.