From 1cde9dd16d9ffc0649a06610e0de08e367cb0415 Mon Sep 17 00:00:00 2001 From: Akis Kesoglou Date: Wed, 18 Apr 2018 18:27:57 +0300 Subject: [PATCH] Properly propagate delta failure Change-Type: patch Closes: #627 --- src/lib/docker-utils.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/docker-utils.coffee b/src/lib/docker-utils.coffee index 264fc6d6..7e715a4c 100644 --- a/src/lib/docker-utils.coffee +++ b/src/lib/docker-utils.coffee @@ -24,7 +24,9 @@ applyDelta = (imgSrc, deltaUrl, applyTimeout, opts, onProgress) -> deltaStream = dockerDelta.applyDelta(imgSrc, timeout: applyTimeout) res.pipe(deltaStream) .on('id', (id) -> resolve('sha256:' + id)) - .on('error', req.abort.bind(req)) + .on 'error', (err) -> + req.abort() + reject(err) module.exports = class DockerUtils extends DockerToolbelt constructor: (opts) ->