From 515656150326d559a27ae12956ba4d46bb7829c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 4 Feb 2019 15:56:41 -0800 Subject: [PATCH] fix(write): avoid another cb never called situation --- lib/content/write.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/content/write.js b/lib/content/write.js index c713634..ff0d15a 100644 --- a/lib/content/write.js +++ b/lib/content/write.js @@ -112,7 +112,7 @@ function pipeToTmp (inputStream, cache, tmpTarget, opts, errCheck) { errCheck() return pipe(inputStream, hashStream, outStream).then(() => { return {integrity, size} - }, err => { + }).catch(err => { return rimraf(tmpTarget).then(() => { throw err }) }) })