Avoiding installing the same version multiple times (#252)

pull/259/head
Adam Ralph 4 years ago committed by GitHub
parent 13b852df87
commit c20f59e04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
dist/index.js vendored

@ -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();
}

@ -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

Loading…
Cancel
Save