Merge pull request #218 from resin-io/jviotti/fix/windows-edison

Avoid _.ary in temporal path disposer
This commit is contained in:
Juan Cruz Viotti 2015-10-12 18:28:30 -04:00
commit e9147f0f6f
2 changed files with 5 additions and 2 deletions

View File

@ -147,7 +147,9 @@
download = function() {
return tmp.tmpNameAsync().then(function(temporalPath) {
return capitano.runAsync("os download " + application.device_type + " --output " + temporalPath);
}).disposer(_.ary(rimraf, 1));
}).disposer(function(temporalPath) {
return rimraf(temporalPath);
});
};
return Promise.using(download(), function(temporalPath) {
return capitano.runAsync("device register " + application.app_name).then(resin.models.device.get).tap(function(device) {

View File

@ -203,7 +203,8 @@ exports.init =
download = ->
tmp.tmpNameAsync().then (temporalPath) ->
capitano.runAsync("os download #{application.device_type} --output #{temporalPath}")
.disposer(_.ary(rimraf, 1))
.disposer (temporalPath) ->
return rimraf(temporalPath)
Promise.using download(), (temporalPath) ->
capitano.runAsync("device register #{application.app_name}")