Skip to content
Merged
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ jobs:
runs-on: ubuntu-22.04
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net,builds.dotnet.microsoft.com,ci.dot.net
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -741,7 +741,7 @@ jobs:
runs-on: ubuntu-latest
env:
https_proxy: http://no-such-proxy:3128
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net,builds.dotnet.microsoft.com,ci.dot.net
no_proxy: github.com,download.visualstudio.microsoft.com,api.nuget.org,builds.dotnet.microsoft.com,ci.dot.net
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
9 changes: 1 addition & 8 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102230,13 +102230,7 @@ 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 => {
Expand All @@ -102252,7 +102246,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';
Expand Down
15 changes: 3 additions & 12 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,9 @@ export class DotnetVersionResolver {
maxRetries: 3
});

let response;
try {
response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexUrl
);
} catch (error) {
response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexFallbackUrl
);
}
const response = await httpClient.getJson<any>(
DotnetVersionResolver.DotnetCoreIndexUrl
);

const result = response.result || {};
const releasesInfo: any[] = result['releases-index'];
Expand All @@ -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 {
Expand Down
Loading