Skip to content

Commit

Permalink
Remove storage account fallback logic (v1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Taylor committed Jan 2, 2025
1 parent 71a4fd9 commit 0d16f91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
11 changes: 2 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18168,13 +18168,8 @@ class DotnetCoreInstaller {
}
getReleasesJsonUrl(httpClient, versionParts) {
return __awaiter(this, void 0, void 0, function* () {
let response;
try {
response = yield httpClient.getJson(DotNetCoreIndexUrl);
}
catch (error) {
response = yield httpClient.getJson(DotnetCoreIndexFallbackUrl);
}
const response = yield httpClient.getJson(DotNetCoreIndexUrl);

const result = response.result || {};
let releasesInfo = result['releases-index'];
releasesInfo = releasesInfo.filter((info) => {
Expand All @@ -18199,8 +18194,6 @@ class DotnetCoreInstaller {
}
exports.DotnetCoreInstaller = DotnetCoreInstaller;
const DotNetCoreIndexUrl = 'https://builds.dotnet.microsoft.com/dotnet/release-metadata/releases-index.json';
const DotnetCoreIndexFallbackUrl = 'https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json';


/***/ }),

Expand Down
11 changes: 2 additions & 9 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,8 @@ export class DotnetCoreInstaller {
httpClient: hc.HttpClient,
versionParts: string[]
): Promise<string> {
let response;
try {
response = await httpClient.getJson<any>(DotNetCoreIndexUrl);
} catch (error) {
response = await httpClient.getJson<any>(DotnetCoreIndexFallbackUrl);
}
const response = await httpClient.getJson<any>(DotNetCoreIndexUrl);

const result = response.result || {};
let releasesInfo: any[] = result['releases-index'];

Expand Down Expand Up @@ -306,6 +302,3 @@ export class DotnetCoreInstaller {

const DotNetCoreIndexUrl: string =
'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';

0 comments on commit 0d16f91

Please sign in to comment.