mirror of
https://gitea.com/actions/setup-node.git
synced 2025-09-14 07:38:30 +08:00
minor fix
This commit is contained in:
@@ -22,10 +22,14 @@ export default class NightlyNodejs extends BaseDistribution {
|
||||
);
|
||||
|
||||
for (let i = versions.length - 1; i >= 0; i--) {
|
||||
const potential: string = versions[i].replace('nightly', 'nightly.');
|
||||
const satisfied: boolean = semver.satisfies(potential, range, {
|
||||
includePrerelease: includePrerelease
|
||||
});
|
||||
const potential: string = versions[i];
|
||||
const satisfied: boolean = semver.satisfies(
|
||||
potential.replace('nightly', 'nightly.'),
|
||||
range,
|
||||
{
|
||||
includePrerelease: includePrerelease
|
||||
}
|
||||
);
|
||||
if (satisfied) {
|
||||
version = potential;
|
||||
break;
|
||||
|
@@ -18,10 +18,14 @@ export default class CanaryBuild extends BaseDistribution {
|
||||
);
|
||||
|
||||
for (let i = versions.length - 1; i >= 0; i--) {
|
||||
const potential: string = versions[i].replace('v8-canary', 'v8-canary.');
|
||||
const satisfied: boolean = semver.satisfies(potential, range, {
|
||||
includePrerelease: includePrerelease
|
||||
});
|
||||
const potential: string = versions[i];
|
||||
const satisfied: boolean = semver.satisfies(
|
||||
potential.replace('v8-canary', 'v8-canary.'),
|
||||
range,
|
||||
{
|
||||
includePrerelease: includePrerelease
|
||||
}
|
||||
);
|
||||
if (satisfied) {
|
||||
version = potential;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user