Skip to content

Commit 4997896

Browse files
authored
Warn users when installing EOL .NET versions (#245)
1 parent 76ddd67 commit 4997896

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18183,7 +18183,11 @@ class DotnetCoreInstaller {
1818318183
if (releasesInfo.length === 0) {
1818418184
throw new Error(`Could not find info for version ${versionParts.join('.')} at ${DotNetCoreIndexUrl}`);
1818518185
}
18186-
return releasesInfo[0]['releases.json'];
18186+
const releaseInfo = releasesInfo[0];
18187+
if (releaseInfo['support-phase'] === 'eol') {
18188+
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.`);
18189+
}
18190+
return releaseInfo['releases.json'];
1818718191
});
1818818192
}
1818918193
}

src/installer.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,14 @@ export class DotnetCoreInstaller {
285285
);
286286
}
287287

288-
return releasesInfo[0]['releases.json'];
288+
const releaseInfo = releasesInfo[0];
289+
if (releaseInfo['support-phase'] === 'eol') {
290+
core.warning(
291+
`${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.`
292+
);
293+
}
294+
295+
return releaseInfo['releases.json'];
289296
}
290297

291298
private version: string;

0 commit comments

Comments
 (0)