Warn users when installing EOL .NET versions (#245)

This commit is contained in:
GGG KILLER 2021-11-23 10:58:49 -03:00 committed by GitHub
parent 76ddd67c90
commit 499789684c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

6
dist/index.js vendored
View File

@ -18183,7 +18183,11 @@ class DotnetCoreInstaller {
if (releasesInfo.length === 0) { if (releasesInfo.length === 0) {
throw new Error(`Could not find info for version ${versionParts.join('.')} at ${DotNetCoreIndexUrl}`); throw new Error(`Could not find info for version ${versionParts.join('.')} at ${DotNetCoreIndexUrl}`);
} }
return releasesInfo[0]['releases.json']; const releaseInfo = releasesInfo[0];
if (releaseInfo['support-phase'] === 'eol') {
core.warning(`${releaseInfo['product']} ${releaseInfo['channel-version']} is no longer supported and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy.`);
}
return releaseInfo['releases.json'];
}); });
} }
} }

View File

@ -285,7 +285,14 @@ export class DotnetCoreInstaller {
); );
} }
return releasesInfo[0]['releases.json']; const releaseInfo = releasesInfo[0];
if (releaseInfo['support-phase'] === 'eol') {
core.warning(
`${releaseInfo['product']} ${releaseInfo['channel-version']} is no longer supported and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy.`
);
}
return releaseInfo['releases.json'];
} }
private version: string; private version: string;