From bae8ebbf52c3f56bee35614c4defeb8daa73aba2 Mon Sep 17 00:00:00 2001 From: Brian Terlson Date: Wed, 13 Jul 2016 13:23:12 -0700 Subject: [PATCH] Fix bug when looking for report directory --- bin/run.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/run.js b/bin/run.js index 9be671c..f0547ab 100755 --- a/bin/run.js +++ b/bin/run.js @@ -4,6 +4,7 @@ // This code is governed by the BSD License found in the LICENSE file. const compile = require('test262-compiler'); const fs = require('fs'); +const Path = require('path'); const globber = require('../lib/globber.js'); const argv = require('../lib/cli.js').argv; const validator = require('../lib/validator.js'); @@ -15,7 +16,7 @@ const test262Finder = require('../lib/findTest262.js'); const scenariosForTest = require('../lib/scenarios.js'); let reporter; -if (fs.existsSync('lib/reporters/' + argv.reporter + '.js')) { +if (fs.existsSync(Path.join(__dirname, '../lib/reporters', argv.reporter + '.js'))) { reporter = require('../lib/reporters/' + argv.reporter + '.js'); } else { console.error(`Reporter ${argv.reporter} not found.`); diff --git a/package.json b/package.json index 7a5153d..b441011 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "test262-harness", "repository": "bterlson/test262-harness", - "version": "2.0.0", + "version": "2.0.1", "description": "Node-based harness for test262", "main": "index.js", "bin": {