Remove CDN fallback logic (v2)

This commit is contained in:
Zachary Taylor 2025-01-02 00:11:57 +00:00
parent aab9aab748
commit 0b32034241
2 changed files with 1299 additions and 1307 deletions

2595
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -262,12 +262,8 @@ export class DotnetCoreInstaller {
httpClient: hc.HttpClient, httpClient: hc.HttpClient,
versionParts: string[] versionParts: string[]
): Promise<string> { ): Promise<string> {
let response; const response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
try {
response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
} catch (error) {
response = await httpClient.getJson<any>(DotnetCoreIndexFallbackUrl);
}
const result = response.result || {}; const result = response.result || {};
let releasesInfo: any[] = result['releases-index']; let releasesInfo: any[] = result['releases-index'];
@ -307,6 +303,3 @@ export class DotnetCoreInstaller {
const DotNetCoreIndexUrl: string = const DotNetCoreIndexUrl: string =
'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json'; 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
const DotnetCoreIndexFallbackUrl: string =
'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';