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

fix versionSpec required error

This commit is contained in:
panticmilos 2022-05-19 17:02:08 +02:00
parent 8c66f89aef
commit 45e544a71a

View file

@ -378,6 +378,15 @@ async function queryDistForMatch(
let versions: string[] = [];
let nodeVersions = await getVersionsFromDist();
if (
versionSpec === 'current' ||
versionSpec === 'latest' ||
versionSpec === 'node'
) {
core.info(`getting latest node version...`);
return nodeVersions[0].version;
}
nodeVersions.forEach((nodeVersion: INodeVersion) => {
// ensure this version supports your os and platform
if (nodeVersion.files.indexOf(dataFileName) >= 0) {