From 746e0c3f4650c1b6a543378c2cbe122cd752cd08 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Thu, 10 Mar 2022 11:30:43 +0000 Subject: [PATCH] Fix bug in client.mjs --- appveyor.yml | 4 ++-- core/client.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 63ced50..8f6cbe7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,11 +30,11 @@ test_script: chmod -R 777 /appveyor/projects npm install npm run test -- --ignore-only - if [ $? -ne 0 ] ; + if [ $? -ne 0 ]; then exit 1 fi npm run test:integration -- --ignore-only - if [ $? -ne 0 ] ; + if [ $? -ne 0 ]; then exit 1 fi diff --git a/core/client.mjs b/core/client.mjs index 7c1b602..f493836 100644 --- a/core/client.mjs +++ b/core/client.mjs @@ -118,7 +118,7 @@ export function request(config, path, filePath = null, redirects, fastRaw = fals // Do some cleanup in case we were in the middle of downloading file return fs.rm(filePath, function() { - reject(Util.combineStack(err)) + reject(Util.combineStack(err, orgErr)) }) } // Let the pipeline do the resolving so it can finish flusing before calling resolve