mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-11 15:33:06 +00:00
Merge pull request #218 from resin-io/jviotti/fix/windows-edison
Avoid _.ary in temporal path disposer
This commit is contained in:
commit
e9147f0f6f
@ -147,7 +147,9 @@
|
|||||||
download = function() {
|
download = function() {
|
||||||
return tmp.tmpNameAsync().then(function(temporalPath) {
|
return tmp.tmpNameAsync().then(function(temporalPath) {
|
||||||
return capitano.runAsync("os download " + application.device_type + " --output " + 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 Promise.using(download(), function(temporalPath) {
|
||||||
return capitano.runAsync("device register " + application.app_name).then(resin.models.device.get).tap(function(device) {
|
return capitano.runAsync("device register " + application.app_name).then(resin.models.device.get).tap(function(device) {
|
||||||
|
@ -203,7 +203,8 @@ exports.init =
|
|||||||
download = ->
|
download = ->
|
||||||
tmp.tmpNameAsync().then (temporalPath) ->
|
tmp.tmpNameAsync().then (temporalPath) ->
|
||||||
capitano.runAsync("os download #{application.device_type} --output #{temporalPath}")
|
capitano.runAsync("os download #{application.device_type} --output #{temporalPath}")
|
||||||
.disposer(_.ary(rimraf, 1))
|
.disposer (temporalPath) ->
|
||||||
|
return rimraf(temporalPath)
|
||||||
|
|
||||||
Promise.using download(), (temporalPath) ->
|
Promise.using download(), (temporalPath) ->
|
||||||
capitano.runAsync("device register #{application.app_name}")
|
capitano.runAsync("device register #{application.app_name}")
|
||||||
|
Loading…
Reference in New Issue
Block a user