Permalink
Browse files

fix fatal detection

  • Loading branch information...
1 parent cc3d518 commit 8d04411312adde206742868fccc806e7441ab885 @stagas stagas committed Mar 7, 2013
Showing with 3 additions and 5 deletions.
  1. +0 −2 bin/component-install
  2. +3 −3 lib/Package.js
View
@@ -143,8 +143,6 @@ function report(pkg, options) {
log('install', pkg.name + '@' + pkg.version);
pkg.on('error', function(err){
- if (404 != err.status) utils.fatal(err.stack);
-
if (err.fatal) {
error(err.message);
process.exit(1);
View
@@ -314,7 +314,7 @@ Package.prototype.reallyInstall = function(){
if (!self.remote) return self.emit('error', new Error('can\'t find remote for "' + self.name + '"'));
// parse remote
- last = i == self.remotes.length - 1;
+ last = i == self.remotes.length;
self.remote = url.parse(self.remote);
// strip trailing /
@@ -328,7 +328,7 @@ Package.prototype.reallyInstall = function(){
batch = new Batch;
self.getJSON(function(err, json){
if (err) {
- err.fatal = !last;
+ err.fatal = last;
return self.emit('error', err);
}
@@ -362,7 +362,7 @@ Package.prototype.reallyInstall = function(){
batch.end(function(err){
if (err) {
- err.fatal = !last;
+ err.fatal = last;
return self.emit('error', err);
}
self.emit('end');

0 comments on commit 8d04411

Please sign in to comment.