Skip to content

Commit

Permalink
Fix parsing of config files with "_mocha" (#3894)
Browse files Browse the repository at this point in the history
  • Loading branch information
juergba authored Apr 29, 2019
1 parent ae27afc commit 109f05e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ exports.main = (argv = process.argv.slice(2)) => {

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

var args = loadOptions(argv);

yargs()
.scriptName('mocha')
.command(commands.run)
Expand Down Expand Up @@ -60,7 +62,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 109f05e

Please sign in to comment.