Skip to content

Commit

Permalink
Fix help output.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorgripasov committed Dec 28, 2020
1 parent ae13586 commit 9b411c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/cli-core/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ export class App {
return new Promise((resolve, reject) => {
const context = {};

if (!interactive) {
this._parser.usage(BANNER + '$0 [command]');
}

// http://yargs.js.org/docs/#api-parseargs-context-parsecallback
this._parser
.usage(BANNER + '$0 [command]')

// Bug: yargs resets help settings after first usage of external CLI, so need to set it again.
.help(true)

Expand Down Expand Up @@ -228,10 +230,6 @@ export class App {
log(output.toString());
}

if (output && output.command === 'help' && output.output) {
log(output.output.toString());
}

return result;
};

Expand Down

0 comments on commit 9b411c1

Please sign in to comment.