Skip to content

Commit

Permalink
refactor(CLI): Recognize "--version" on command as help request
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Mar 22, 2021
1 parent 271ac82 commit 23f45a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/cli/resolve-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ module.exports = memoizee(() => {

const result = { commands, options };

if ((!command && options['help-interactive']) || options.help) result.isHelpRequest = true;
if ((!command && options['help-interactive']) || options.help || options.version) {
result.isHelpRequest = true;
}
return result;
});

0 comments on commit 23f45a3

Please sign in to comment.