Fix callback not being called on success in os download command

This commit is contained in:
Juan Cruz Viotti 2015-05-11 14:23:34 -03:00
parent 9b0c08bd46
commit 9bb04f43a8
2 changed files with 2 additions and 4 deletions

View File

@ -74,9 +74,7 @@
spinner = new visuals.widgets.Spinner('Downloading Device OS (size unknown)');
return resin.models.os.download(osParams, options.output, function(error) {
spinner.stop();
if (error != null) {
return callback(error);
}
return callback(error);
}, function(state) {
if (state != null) {
return bar.update(state);

View File

@ -82,7 +82,7 @@ exports.download =
resin.models.os.download osParams, options.output, (error) ->
spinner.stop()
return callback(error) if error?
return callback(error)
, (state) ->
if state?
bar.update(state)