You've already forked setup-node
mirror of
https://github.com/actions/setup-node.git
synced 2025-09-08 22:04:03 +07:00
check-latest
This commit is contained in:
@ -318,6 +318,11 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
const versions = this.filterVersions(nodeJsVersions);
|
||||
const evaluatedVersion = this.evaluateVersions(versions);
|
||||
|
||||
if (this.nodeInfo.checkLatest) {
|
||||
const evaluatedVersion = await this.findVersionInDist(nodeJsVersions);
|
||||
this.nodeInfo.versionSpec = evaluatedVersion;
|
||||
}
|
||||
|
||||
if (!evaluatedVersion) {
|
||||
throw new Error(
|
||||
`Unable to find Node version '${this.nodeInfo.versionSpec}' for platform ${this.osPlat} and architecture ${this.nodeInfo.arch}.`
|
||||
|
Reference in New Issue
Block a user