Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
fix: allow unknown options before parsing config file
Browse files Browse the repository at this point in the history
  • Loading branch information
j0tunn committed Dec 7, 2017
1 parent c316eca commit 98a5d5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports.run = () => {

program
.version(pkg.version)
.allowUnknownOption()
.option('-c, --config <file>', 'config file');

const configPath = preparseOption(program, 'config');
Expand All @@ -26,14 +27,14 @@ exports.run = () => {
.option('--grep <pattern>', 'run only suites matching the pattern', RegExp);

program.command('update [paths...]')
.allowUnknownOption(true)
.allowUnknownOption()
.option('--diff', 'update only screenshots with diff')
.option('--new', 'save only new screenshots')
.description('update the changed screenshots or gather if they doesn\'t exist')
.action((paths, options) => mkRunFn(gemini, 'update', program)(paths, options).done());

program.command('test [paths...]')
.allowUnknownOption(true)
.allowUnknownOption()
.option('-r, --reporter <reporter>', 'test result reporter (flat by default)', collect)
.option('-s, --set <set>', 'set to run', collect)
.description('run tests')
Expand Down
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"bluebird": "^3.4.6",
"browserify": "^13.0.0",
"chalk": "^1.1.3",
"commander": "^2.8.1",
"commander": "^2.12.2",
"css": "^2.1.0",
"debug": "^2.2.0",
"fs-extra": "^0.30.0",
Expand Down

0 comments on commit 98a5d5f

Please sign in to comment.