diff --git a/lib/index.ts b/lib/index.ts index b13651861..0532d0558 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -33,15 +33,20 @@ export class SurgioCommand extends Command { updateNotifier({ pkg: require('../package.json') }).notify(); this.usage = '使用方法: surgio [options]'; - this.yargs.option('V', { - alias: 'verbose', - demandOption: false, - describe: '打印调试日志', - type: 'boolean', - }); this.load(path.join(__dirname, './command')); + this.options = { + V: { + alias: 'verbose', + demandOption: false, + describe: '打印调试日志', + type: 'boolean', + }, + }; + // 禁用 yargs 内部生成的 help 信息,似乎和 common-bin 的 load 有冲突 + this.yargs.help(false); + // istanbul ignore next if (this.yargs.argv.verbose) { transports.console.level = 'debug';