Skip to content

Commit

Permalink
fix some status cli message output bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavisclark committed Feb 15, 2015
1 parent 5128425 commit 9bb6c0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/cli/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ StatusCommand.prototype._printStatus = function(status) {
// not clean

if (status.dirtyMigrations) {
printMigrationList("dirty migrations:", "info", status.dirtyMigrations, "err");
var messages = status.dirtyMigrations.map(function(dirtyMigration) {
return dirtyMigration.key + ":: expected [" + dirtyMigration.hash + "]";
});

printMigrationList("dirty migrations:", "info", messages, "err");
}

if (status.unexecutedMigrations) {
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.printMigrationList = function(header, level, migrations, migrationLevel
reporter[level](header);

migrations.forEach(function(m) {
reporter[migrationLevel](m.key + " :: Expected[" + m.hash + "]" );
reporter[migrationLevel](m);
});
};

Expand Down

0 comments on commit 9bb6c0b

Please sign in to comment.