3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-22 10:09:33 +01:00

Add brief comment about supported formats

This commit is contained in:
Gordey Doronin 2021-06-21 11:37:06 +02:00
parent fa68745dc0
commit c8c6442c74

View file

@ -192,6 +192,7 @@ function findLtsVersionFromManifest(
core.debug(`LTS alias '${alias}' for Node version '${versionSpec}'`); core.debug(`LTS alias '${alias}' for Node version '${versionSpec}'`);
// Supported formats are `lts/<alias>` and `lts/*`. Where asterisk means highest possible LTS.
const release = alias === '*' const release = alias === '*'
? candidates.find(x => !!x.lts && x.stable === stable) ? candidates.find(x => !!x.lts && x.stable === stable)
: candidates.find(x => x.lts?.toLowerCase() === alias && x.stable === stable); : candidates.find(x => x.lts?.toLowerCase() === alias && x.stable === stable);