Bind progress update function to avoid context issues

This commit is contained in:
Juan Cruz Viotti 2015-04-17 10:11:02 -04:00
parent c4d1e4244e
commit caa4fcf754
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@
return done();
}
bar = new visuals.widgets.Progress('Writing Device OS');
params.progress = bar.update;
params.progress = _.bind(bar.update, bar);
return bundle.write(params, callback);
}
], function(error) {

View File

@ -167,7 +167,7 @@ exports.install =
return done() if not confirmed
bar = new visuals.widgets.Progress('Writing Device OS')
params.progress = bar.update
params.progress = _.bind(bar.update, bar)
bundle.write(params, callback)
], (error) ->