mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 22:23:13 +00:00
Nicer use of spawn
This commit is contained in:
parent
9dd1fa2408
commit
676f6699fe
@ -88,7 +88,7 @@ exports.rsyncImageWithProgress = (imgDest, onProgress, startFromEmpty = false) -
|
||||
return [ rsyncDiff, imageConfig, imgSrc ]
|
||||
.spread (rsyncDiff, imageConfig, imgSrc) ->
|
||||
new Promise (resolve, reject) ->
|
||||
dockersync = spawn('/app/src/dockersync.sh', [ imgSrc, imgDest, JSON.stringify(imageConfig) ], stdio: [ 'pipe', 'pipe', 'pipe' ])
|
||||
dockersync = spawn('/app/src/dockersync.sh', [ imgSrc, imgDest, JSON.stringify(imageConfig) ], stdio: 'pipe')
|
||||
.on 'error', reject
|
||||
.on 'exit', (code, signal) ->
|
||||
if code in DELTA_OUT_OF_SYNC_CODES
|
||||
|
Loading…
Reference in New Issue
Block a user