Fix ./main.js --version
This commit is contained in:
parent
23c9e89849
commit
941e7d0a03
10
core/bbs.js
10
core/bbs.js
|
@ -45,6 +45,10 @@ function printHelpAndExit() {
|
|||
process.exit();
|
||||
}
|
||||
|
||||
function printVersionAndExit() {
|
||||
console.info(require('../package.json').version);
|
||||
}
|
||||
|
||||
function main() {
|
||||
async.waterfall(
|
||||
[
|
||||
|
@ -52,7 +56,11 @@ function main() {
|
|||
const argv = require('minimist')(process.argv.slice(2));
|
||||
|
||||
if(argv.help) {
|
||||
printHelpAndExit();
|
||||
return printHelpAndExit();
|
||||
}
|
||||
|
||||
if(argv.version) {
|
||||
return printVersionAndExit();
|
||||
}
|
||||
|
||||
const configOverridePath = argv.config;
|
||||
|
|
Loading…
Reference in New Issue