Skip to content

Commit

Permalink
Handle name conflict for --version option (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
draperunner authored and Esemesek committed Sep 12, 2019
1 parent 4b56ef4 commit 7bf983b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cli/src/cliEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async function setupAndRun() {
// We handle --version as a special case like this because both `commander`
// and `yargs` append it to every command and we don't want to do that.
// E.g. outside command `init` has --version flag and we want to preserve it.
if (commander.args.length === 0 && commander.version === true) {
if (commander.args.length === 0 && commander.rawArgs.includes('--version')) {
console.log(pkgJson.version);
}

Expand Down

0 comments on commit 7bf983b

Please sign in to comment.