mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-05 01:00:48 +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 ]
|
return [ rsyncDiff, imageConfig, imgSrc ]
|
||||||
.spread (rsyncDiff, imageConfig, imgSrc) ->
|
.spread (rsyncDiff, imageConfig, imgSrc) ->
|
||||||
new Promise (resolve, reject) ->
|
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 'error', reject
|
||||||
.on 'exit', (code, signal) ->
|
.on 'exit', (code, signal) ->
|
||||||
if code in DELTA_OUT_OF_SYNC_CODES
|
if code in DELTA_OUT_OF_SYNC_CODES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user