Skip to content

Commit

Permalink
Merge pull request #1474 from monowerker/topic/mocha.opts-exception#1471
Browse files Browse the repository at this point in the history
Topic/mocha.opts exception#1471
  • Loading branch information
Travis Jeffery committed Dec 16, 2014
2 parents a9b48c8 + a81045b commit 17f354c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
*/

var program = require('commander')
, sprintf = require('util').format
, path = require('path')
, fs = require('fs')
, glob = require('glob')
, resolve = path.resolve
, exists = fs.existsSync || path.existsSync
, Mocha = require('../')
, utils = Mocha.utils
, interfaces = Mocha.interfaces
, join = path.join
, basename = path.basename
, cwd = process.cwd()
, mocha = new Mocha;

Expand Down Expand Up @@ -180,7 +176,10 @@ var optsPath = process.argv.indexOf('--opts') !== -1
try {
var opts = fs.readFileSync(optsPath, 'utf8')
.trim()
.split(/\s+/);
.split(/\s+/)
.filter(function(value) {
return value ? true : false;
});

process.argv = process.argv
.slice(0, 2)
Expand Down

0 comments on commit 17f354c

Please sign in to comment.