Skip to content

Commit

Permalink
Avoiding installing the same version multiple times (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamralph authored Dec 29, 2021
1 parent 13b852d commit c20f59e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/setup-dotnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c20f59e

Please sign in to comment.