Skip to content

Commit

Permalink
Warn users when installing EOL .NET versions (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
GGG-KILLER authored Nov 23, 2021
1 parent 76ddd67 commit 4997896
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18183,7 +18183,11 @@ class DotnetCoreInstaller {
if (releasesInfo.length === 0) {
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'];
});
}
}
Expand Down
9 changes: 8 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4997896

Please sign in to comment.