Skip to content

Commit

Permalink
gh-863: Fix yargs warning (#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
littlewhywhat committed Jan 4, 2022
1 parent bb32f60 commit d85814e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions bin/node-pg-migrate
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,10 @@ const { argv } = yargs
type: 'boolean',
})

.option('i', {
alias: 'version',
default: false,
describe: 'Print version info',
type: 'boolean',
})

.version()
.alias('version', 'i')
.help()

if (argv.version) {
console.log(module.exports.version)
process.exit(0)
}

if (argv.help || argv._.length === 0) {
yargs.showHelp()
process.exit(1)
Expand Down

0 comments on commit d85814e

Please sign in to comment.