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

Commit 98a5d5f

Browse files
committed
fix: allow unknown options before parsing config file
1 parent c316eca commit 98a5d5f

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

lib/cli/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ exports.run = () => {
1616

1717
program
1818
.version(pkg.version)
19+
.allowUnknownOption()
1920
.option('-c, --config <file>', 'config file');
2021

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

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

3536
program.command('test [paths...]')
36-
.allowUnknownOption(true)
37+
.allowUnknownOption()
3738
.option('-r, --reporter <reporter>', 'test result reporter (flat by default)', collect)
3839
.option('-s, --set <set>', 'set to run', collect)
3940
.description('run tests')

package-lock.json

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"bluebird": "^3.4.6",
1515
"browserify": "^13.0.0",
1616
"chalk": "^1.1.3",
17-
"commander": "^2.8.1",
17+
"commander": "^2.12.2",
1818
"css": "^2.1.0",
1919
"debug": "^2.2.0",
2020
"fs-extra": "^0.30.0",

0 commit comments

Comments
 (0)