From 09ddc958fdf989f10341d7aacac68b937ee936bc Mon Sep 17 00:00:00 2001 From: Zachary Taylor Date: Wed, 1 Jan 2025 23:48:50 +0000 Subject: [PATCH] Remove logic for azureedge.net fallback in preparation for install script changes --- dist/setup/index.js | 10 ++-------- src/installer.ts | 15 +++------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index d415cbd..d10c4b0 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -93806,13 +93806,8 @@ class DotnetVersionResolver { allowRetries: true, maxRetries: 3 }); - let response; - try { - response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl); - } - catch (error) { - response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexFallbackUrl); - } + const response = yield httpClient.getJson(DotnetVersionResolver.DotnetCoreIndexUrl); + const result = response.result || {}; const releasesInfo = result['releases-index']; const releaseInfo = releasesInfo.find(info => { @@ -93828,7 +93823,6 @@ class DotnetVersionResolver { } exports.DotnetVersionResolver = DotnetVersionResolver; DotnetVersionResolver.DotnetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json'; -DotnetVersionResolver.DotnetCoreIndexFallbackUrl = 'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json'; class DotnetInstallScript { constructor() { this.scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; diff --git a/src/installer.ts b/src/installer.ts index 4773b8d..12f58d7 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -102,16 +102,9 @@ export class DotnetVersionResolver { maxRetries: 3 }); - let response; - try { - response = await httpClient.getJson( - DotnetVersionResolver.DotnetCoreIndexUrl - ); - } catch (error) { - response = await httpClient.getJson( - DotnetVersionResolver.DotnetCoreIndexFallbackUrl - ); - } + const response = await httpClient.getJson( + DotnetVersionResolver.DotnetCoreIndexUrl + ); const result = response.result || {}; const releasesInfo: any[] = result['releases-index']; @@ -132,8 +125,6 @@ export class DotnetVersionResolver { static DotnetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json'; - static DotnetCoreIndexFallbackUrl = - 'https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json'; } export class DotnetInstallScript {