From 408904264e93881af0e1428b973ed1343bdc97c0 Mon Sep 17 00:00:00 2001 From: "Martin M." Date: Mon, 20 Jan 2025 16:06:46 +0100 Subject: [PATCH] Avoid crash if some file cannot be downloaded --- README.md | 4 ++++ lib/common.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 144398e..c45dfb6 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ npx @iobroker/repochecker https://github.com/ioBroker/ioBroker.javascript --loca --> ## Changelog +### **WORK IN PROGRESS** + +- (mcm1957) Avoid crash if some file cannot be downloaded. + ### 3.3.1 (2025-01-19) - (mcm1957) Report malformed semver specifications has been fixed. diff --git a/lib/common.js b/lib/common.js index 527a192..5b51bfd 100644 --- a/lib/common.js +++ b/lib/common.js @@ -52,7 +52,7 @@ async function downloadFile(githubUrl, path, binary, noError) { return response.data; } catch (e) { (!noError || gDebug) && console.error(`Cannot download ${githubUrl}${path || ''} ${e}`); - throw e; + return ''; } } else { console.log(`Download local ${path || ''}`);