Permalink
Browse files

Use "catch" in place of "otherwise"

  • Loading branch information...
mariocasciaro committed Jan 7, 2014
1 parent d08d061 commit a67162ea2dd833c0518a9a02b18c68cbe5616d49
Showing with 8 additions and 8 deletions.
  1. +3 −3 lib/npm-workspace.js
  2. +5 −5 test/test.js
View
@@ -27,7 +27,7 @@ self.cli = function() {
.action(function(){
self.install(process.cwd()).then(function() {
console.log('[npm-workspace] Done, happy coding!');
- }).otherwise(function(err) {
+ }).catch(function(err) {
console.log(err.stack + "\n[npm-workspace] Ooooops, it wasn\'t my fault, I swear");
});
});
@@ -38,7 +38,7 @@ self.cli = function() {
.action(function(){
self.clean(process.cwd()).then(function() {
console.log('[npm-workspace] Done, happy coding!');
- }).otherwise(function(err) {
+ }).catch(function(err) {
console.log(err.stack + "\n[npm-workspace] Ooooops, it wasn\'t my fault, I swear");
});
});
@@ -229,7 +229,7 @@ self.npm = function(args, cwd) {
}
return spawned('npm', args, options)
- .otherwise(function(proc) {
+ .catch(function(proc) {
console.error(proc.combined);
});
};
View
@@ -55,7 +55,7 @@ describe('npm-workspace install', function() {
npm_workspace.install(prjRoot).then(function() {
checkPrj1Install("true");
done();
- }).otherwise(done);
+ }).catch(done);
});
it('should install and link a module (command line)', function(done) {
@@ -81,7 +81,7 @@ describe('npm-workspace install', function() {
//prj4 is disconnected from others
checkPrj4Install();
done();
- }).otherwise(done);
+ }).catch(done);
});
it('should install and link a workspace (command line)', function(done) {
@@ -137,7 +137,7 @@ describe('npm-workspace clean', function() {
}).then(function() {
expect(fs.existsSync(prjRoot + "/node_modules")).to.be.false;
done();
- }).otherwise(done);
+ }).catch(done);
});
@@ -157,7 +157,7 @@ describe('npm-workspace clean', function() {
done();
}
});
- }).otherwise(done);
+ }).catch(done);
});
@@ -177,6 +177,6 @@ describe('npm-workspace clean', function() {
});
done();
- }).otherwise(done);
+ }).catch(done);
});
});

0 comments on commit a67162e

Please sign in to comment.