Avoiding installing the same version multiple times (#252)

This commit is contained in:
Adam Ralph 2021-12-29 12:07:42 +01:00 committed by GitHub
parent 13b852df87
commit c20f59e04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored
View File

@ -8687,7 +8687,7 @@ function run() {
const includePrerelease = (core.getInput('include-prerelease') || 'false').toLowerCase() ===
'true';
let dotnetInstaller;
for (const version of versions) {
for (const version of new Set(versions)) {
dotnetInstaller = new installer.DotnetCoreInstaller(version, includePrerelease);
yield dotnetInstaller.installDotnet();
}

View File

@ -28,7 +28,7 @@ export async function run() {
(core.getInput('include-prerelease') || 'false').toLowerCase() ===
'true';
let dotnetInstaller!: installer.DotnetCoreInstaller;
for (const version of versions) {
for (const version of new Set<string>(versions)) {
dotnetInstaller = new installer.DotnetCoreInstaller(
version,
includePrerelease