From c20f59e04ac89e07b0b6d08da3c8694acdfaaf7a Mon Sep 17 00:00:00 2001 From: Adam Ralph Date: Wed, 29 Dec 2021 12:07:42 +0100 Subject: [PATCH] Avoiding installing the same version multiple times (#252) --- dist/index.js | 2 +- src/setup-dotnet.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index a210d87..4344db7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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(); } diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index f82bb14..65c9893 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -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(versions)) { dotnetInstaller = new installer.DotnetCoreInstaller( version, includePrerelease