Skip to content

Commit

Permalink
fix parsing of config files with "_mocha"
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba committed Apr 28, 2019
1 parent 59fcf71 commit 61775e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cli/cli.js
Expand Up @@ -32,6 +32,9 @@ exports.main = (argv = process.argv.slice(2)) => {

Error.stackTraceLimit = Infinity; // configurable via --stack-trace-limit?

// to do: optimise, when called by "_mocha", but already pre-loaded by 'mocha'
var args = loadOptions(argv);

yargs()
.scriptName('mocha')
.command(commands.run)
Expand Down Expand Up @@ -60,7 +63,8 @@ exports.main = (argv = process.argv.slice(2)) => {
`
)
.parserConfiguration(YARGS_PARSER_CONFIG)
.parse(argv, loadOptions(argv));
.config(args)
.parse(args._);
};

// allow direct execution
Expand Down

0 comments on commit 61775e2

Please sign in to comment.