Fix bug with update command

This commit is contained in:
Juan Cruz Viotti 2015-03-04 14:46:34 -04:00
parent e64f8fe0db
commit cefa9d1e31
2 changed files with 7 additions and 4 deletions

View File

@ -22,8 +22,10 @@
};
return npm.load(options, _.unary(callback));
}, function(callback) {
return npm.commands.update([packageJSON.name], callback);
}, function(data, lite, callback) {
return npm.commands.update([packageJSON.name], function(error, data) {
return callback(error, data);
});
}, function(data, callback) {
var newVersion;
if (_.isEmpty(data)) {
return callback(new Error('You are already running the latest version'));

View File

@ -31,9 +31,10 @@ exports.update =
npm.load(options, _.unary(callback))
(callback) ->
npm.commands.update([ packageJSON.name ], callback)
npm.commands.update [ packageJSON.name ], (error, data) ->
return callback(error, data)
(data, lite, callback) ->
(data, callback) ->
if _.isEmpty(data)
return callback(new Error('You are already running the latest version'))