From 62cf1df0023dc4a3b9dfcc2424c4919149ea115c Mon Sep 17 00:00:00 2001 From: develar Date: Wed, 7 Mar 2018 20:39:55 +0100 Subject: [PATCH] fix(electron-updater): add response code to error message about Accept-Ranges --- .travis.yml | 6 +++--- .../src/differentialDownloader/multipleRangeDownloader.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 39ae02a920b..9ef990c4520 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode9.2 +osx_image: xcode9.3beta language: node_js env: @@ -8,11 +8,11 @@ env: matrix: include: - os: osx - env: TEST_FILES=BuildTest,extraMetadataTest,globTest,filesTest,ignoreTest,linux,windows + env: TEST_FILES=BuildTest,extraMetadataTest,globTest,filesTest,ignoreTest,linux,windows,macIconTest node_js: "9" - os: osx - env: TEST_FILES=CodeSignTest,macArchiveTest,macPackagerTest,macIconTest + env: TEST_FILES=CodeSignTest,macArchiveTest,macPackagerTest node_js: "9" - os: osx diff --git a/packages/electron-updater/src/differentialDownloader/multipleRangeDownloader.ts b/packages/electron-updater/src/differentialDownloader/multipleRangeDownloader.ts index 481640238d3..40807bc5b43 100644 --- a/packages/electron-updater/src/differentialDownloader/multipleRangeDownloader.ts +++ b/packages/electron-updater/src/differentialDownloader/multipleRangeDownloader.ts @@ -108,7 +108,7 @@ export function checkIsRangesSupported(response: IncomingMessage, reject: (error if (response.statusCode !== 206) { const acceptRanges = safeGetHeader(response, "accept-ranges") if (acceptRanges == null || acceptRanges === "none") { - reject(new Error("Server doesn't support Accept-Ranges")) + reject(new Error(`Server doesn't support Accept-Ranges (response code ${response.statusCode})`)) return false } }