mirror of
https://github.com/actions/setup-node.git
synced 2026-05-20 15:07:34 +08:00
update mirrorURL versions
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import BasePrereleaseNodejs from '../base-distribution-prerelease';
|
||||
import {NodeInputs} from '../base-models';
|
||||
|
||||
import * as core from '@actions/core';
|
||||
export default class CanaryBuild extends BasePrereleaseNodejs {
|
||||
|
||||
protected distribution = 'v8-canary';
|
||||
constructor(nodeInfo: NodeInputs) {
|
||||
super(nodeInfo);
|
||||
@@ -10,4 +11,14 @@ export default class CanaryBuild extends BasePrereleaseNodejs {
|
||||
protected getDistributionUrl(): string {
|
||||
return 'https://nodejs.org/download/v8-canary';
|
||||
}
|
||||
|
||||
protected getDistributionMirrorUrl(): string {
|
||||
// Check if mirrorUrl exists in the nodeInfo and return it if available
|
||||
const mirrorUrl = this.nodeInfo.mirrorURL;
|
||||
if (mirrorUrl) {
|
||||
core.info(`Using mirror URL: ${mirrorUrl}`);
|
||||
return mirrorUrl;
|
||||
}
|
||||
return 'https://nodejs.org/download/v8-canary';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user