Skip to content

Commit 504ea95

Browse files
committed
Fixed version argument in yargs to display current cli version
1 parent 2019595 commit 504ea95

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lighthouse-cli/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const log = require('../lighthouse-core/lib/log');
3131

3232
const cli = yargs
3333
.help('help')
34-
.version()
34+
.version(() => require('../package').version)
3535
.showHelpOnFail(false, 'Specify --help for available options')
3636

3737
.usage('$0 url')
@@ -85,8 +85,7 @@ Example: --output-path=./lighthouse-results.html`
8585
'list-trace-categories',
8686
'verbose',
8787
'quiet',
88-
'help',
89-
'version'
88+
'help'
9089
])
9190

9291
.choices('output', Object.values(Printer.OUTPUT_MODE))

0 commit comments

Comments
 (0)