Skip to content

Commit 2beb952

Browse files
committed
Fix bug with giving absolute filenames
1 parent bae8ebb commit 2beb952

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/findTest262.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const Path = require('path');
66
module.exports = findTest262Dir;
77
function findTest262Dir(globber) {
88
const set = globber.minimatch.set;
9+
console.log(set);
910
let baseDir;
1011
for (let i = 0; i < set.length; i++) {
1112
let base = [];
@@ -29,6 +30,11 @@ function findTest262Dir(globber) {
2930
}
3031

3132
function findTest262Root(path) {
33+
const stat = fs.statSync(path);
34+
if (stat.isFile()) {
35+
path = Path.dirname(path);
36+
}
37+
3238
const contents = fs.readdirSync(path)
3339
if (contents.indexOf('README.md') > -1
3440
&& contents.indexOf('test') > -1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "test262-harness",
33
"repository": "bterlson/test262-harness",
4-
"version": "2.0.1",
4+
"version": "2.0.2",
55
"description": "Node-based harness for test262",
66
"main": "index.js",
77
"bin": {

0 commit comments

Comments
 (0)