Skip to content

Commit

Permalink
Had a finally instead of a then, fixes #5
Browse files Browse the repository at this point in the history
- Small messaging change to a warning
  • Loading branch information
kategengler committed Apr 3, 2015
1 parent bc2aba7 commit 0600431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions lib/tasks/try.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = Task.extend({
var task = this;

process.on('SIGINT', function() {
console.log( "\nGracefully shutting down from SIGINT (Ctrl-C)" );
task.ui.writeLine( "\nGracefully shutting down from SIGINT (Ctrl-C)" );
BowerHelpers.cleanup(task.project.root).then(function(){
process.exit( );
});
Expand All @@ -27,7 +27,7 @@ module.exports = Task.extend({
return RSVP.resolve(false);
});
})
.finally(function(result){
.then(function(result){
return BowerHelpers.cleanup(task.project.root).then(function(){
if(!result){
task.ui.writeLine('');
Expand All @@ -38,6 +38,11 @@ module.exports = Task.extend({
process.exit(0);
}
});
})
.catch(function(err){
task.ui.writeLine(err);
task.ui.writeLine(err.stack);
process.exit(1);
});
}
});
2 changes: 1 addition & 1 deletion lib/utils/scenario-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = CoreObject.extend({
actualVersion = BowerHelpers.findVersion(dep, manager.project.root);
expectedVersion = scenario.dependencies[dep];
if(actualVersion !== expectedVersion) {
manager.ui.writeLine(Chalk.yellow("Versions do not match: Expected: " + expectedVersion + " but saw " + actualVersion));
manager.ui.writeLine(Chalk.yellow("Versions do not match: Expected: " + expectedVersion + " but saw " + actualVersion + " This might be ok, depending on the scenario"));
}
manager.ui.writeLine(" " + dep + " " + actualVersion);
});
Expand Down

0 comments on commit 0600431

Please sign in to comment.