Skip to content

Commit

Permalink
No need to display help when migrations break - just print error and …
Browse files Browse the repository at this point in the history
…exit unsuccessfully
  • Loading branch information
Sleavely committed Apr 25, 2020
1 parent 5563c75 commit 61fc258
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ const action = cli.input[0]
spinners['afterAll'].succeed(`Finished running ${migrationJobs.length} migration${migrationJobs.length === 1 ? '' : 's'}.`)
}
// Now run 'em
await main.run()
try {
await main.run()
} catch (err) {
console.error(err)
process.exit(1)
}
} else {
cli.showHelp(1)
}
Expand Down

0 comments on commit 61fc258

Please sign in to comment.