Skip to content

Commit

Permalink
revert: migration:show command must exist with zero status code (Fixes
Browse files Browse the repository at this point in the history
…#7349) (#8185)

* feat: add --quiet option to migration:show command

* adding process.exit(0) back

* Update MigrationShowCommand.ts

Co-authored-by: Umed Khudoiberdiev <pleerock.me@gmail.com>
  • Loading branch information
Juddling and pleerock committed Feb 15, 2022
1 parent 93383bd commit e0adeee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/commands/MigrationShowCommand.ts
Expand Up @@ -43,11 +43,10 @@ export class MigrationShowCommand implements yargs.CommandModule {
logging: ["query", "error", "schema"]
});
connection = await createConnection(connectionOptions);
const unappliedMigrations = await connection.showMigrations();
await connection.showMigrations();
await connection.close();

// return error code if there are unapplied migrations for CI
process.exit(unappliedMigrations ? 1 : 0);
process.exit(0);

} catch (err) {
if (connection) await (connection as Connection).close();
Expand Down

0 comments on commit e0adeee

Please sign in to comment.