From 573cf3151445c8f4fd8dc13b4e216d8eb5a693d1 Mon Sep 17 00:00:00 2001 From: Petros Angelatos Date: Fri, 10 Jun 2016 19:19:23 +0000 Subject: [PATCH] fix delta error handling by listening for the 'error' event Signed-off-by: Petros Angelatos --- package.json | 2 +- src/docker-utils.coffee | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 841fe22f..b6e0e329 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/docker-utils.coffee b/src/docker-utils.coffee index 250dedba..bba6dcdd 100644 --- a/src/docker-utils.coffee +++ b/src/docker-utils.coffee @@ -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)