From e5bc00a601544ff678369b4e407166cd7fa720c3 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 14 Sep 2021 07:58:24 -0500 Subject: [PATCH] fix: fallback to older versions in case of http error --- src/llvm/llvm.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/llvm/llvm.ts b/src/llvm/llvm.ts index 53753a36..d0c9e17b 100644 --- a/src/llvm/llvm.ts +++ b/src/llvm/llvm.ts @@ -247,7 +247,8 @@ export async function getSpecificVersionAndUrl(platform: string, version: string for (const specificVersion of getSpecificVersions(version)) { // eslint-disable-next-line no-await-in-loop const url = await getUrl(platform, specificVersion) - if (url !== null) { + // eslint-disable-next-line no-await-in-loop + if (url !== null && (await isValidUrl(url))) { return [specificVersion, url] } }