Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
fix(cli): force and db flags are used
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Apr 23, 2020
1 parent 68cb6ce commit 8b6fd05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cli/db-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ export default class DBSync extends BaseCLICommand {
}

async run (): Promise<void> {
const { args } = this.parse(DBSync)
const { flags } = this.parse(DBSync)

if (args.db) {
config.util.extendDeep(config, { db: args.db })
if (flags.db) {
config.util.extendDeep(config, { db: flags.db })
}

// Init database connection
const sequelize = sequelizeFactory()
this.log('Syncing database')
await sequelize.sync({ force: args.force })
await sequelize.sync({ force: flags.force })
this.log('Done')
this.exit(0)
}
Expand Down

0 comments on commit 8b6fd05

Please sign in to comment.