fix delta error handling by listening for the 'error' event

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
This commit is contained in:
Petros Angelatos 2016-06-10 19:19:23 +00:00
parent 1b7c91a791
commit 573cf31514
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@
"body-parser": "^1.12.0",
"buffer-equal-constant-time": "^1.0.1",
"coffee-script": "~1.9.1",
"docker-delta": "0.0.8",
"docker-delta": "0.0.9",
"docker-progress": "^2.1.0",
"dockerode": "~2.2.9",
"event-stream": "^3.0.20",

View File

@ -98,7 +98,9 @@ do ->
deltaSrc = null
else
deltaSrc = imgSrc
res.pipe(dockerDelta.applyDelta(deltaSrc, imgDest)).on('id', resolve)
res.pipe(dockerDelta.applyDelta(deltaSrc, imgDest))
.on('id', resolve)
.on('error', reject)
.on 'error', reject
.then (id) ->
getRepoAndTag(imgDest)