prevented undefined from getting passed to path.join in the yaml test runner
This commit is contained in:
@ -9,7 +9,7 @@ var path = require('path'),
|
||||
Minimatch = require('minimatch').Minimatch;
|
||||
|
||||
var argv = require('optimist')
|
||||
.default('executable', path.join(process.env.ES_HOME, './bin/elasticsearch'))
|
||||
.default('executable', process.env.ES_HOME ? path.join(process.env.ES_HOME, './bin/elasticsearch') : null)
|
||||
.default('clusterName', 'yaml-test-runner')
|
||||
.default('dataPath', '/tmp/yaml-test-runner')
|
||||
.default('hostname', 'localhost')
|
||||
|
||||
@ -6,8 +6,9 @@ var childProc = require('child_process'),
|
||||
|
||||
exports.start = function (params, cb) {
|
||||
|
||||
if (!fs.existsSync(params.executable)) {
|
||||
return cb(new Error('unable to find elasticsearch executable'));
|
||||
if (!params.executable || !fs.existsSync(params.executable)) {
|
||||
return cb(new Error('unable to find elasticsearch executable, ' +
|
||||
'set ES_HOME env var to the instalation path of elasticsearch'));
|
||||
}
|
||||
|
||||
var server = childProc.spawn(
|
||||
|
||||
Reference in New Issue
Block a user