mirror of
https://github.com/actions/setup-node.git
synced 2026-05-14 01:47:41 +08:00
prints
This commit is contained in:
@@ -21,6 +21,7 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
try {
|
||||
core.info(`Attempting to download using mirror URL...`);
|
||||
downloadPath = await this.downloadFromMirrorURL(); // Attempt to download from the mirror
|
||||
core.info('downloadPath from downloadFromMirrorURL() '+ downloadPath);
|
||||
if (downloadPath) {
|
||||
toolPath = downloadPath;
|
||||
}
|
||||
@@ -317,10 +318,16 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
|
||||
protected async downloadFromMirrorURL() {
|
||||
const nodeJsVersions = await this.getMirrorUrVersions();
|
||||
core.info('nodeJsVersions from getMirrorUrVersions '+nodeJsVersions);
|
||||
const versions = this.filterVersions(nodeJsVersions);
|
||||
core.info('versions from filterVersions '+versions);
|
||||
|
||||
|
||||
const evaluatedVersion = this.evaluateVersions(versions);
|
||||
|
||||
core.info('evaluatedVersion from evaluatedVersions '+evaluatedVersion);
|
||||
|
||||
|
||||
if (!evaluatedVersion) {
|
||||
throw new Error(
|
||||
`Unable to find Node version '${this.nodeInfo.versionSpec}' for platform ${this.osPlat} and architecture ${this.nodeInfo.arch}.`
|
||||
@@ -329,8 +336,13 @@ export default class OfficialBuilds extends BaseDistribution {
|
||||
|
||||
const toolName = this.getNodejsMirrorURLInfo(evaluatedVersion);
|
||||
|
||||
core.info('toolName from getNodejsMirrorURLInfo '+toolName);
|
||||
|
||||
|
||||
try {
|
||||
const toolPath = await this.downloadNodejs(toolName);
|
||||
core.info('toolPath from downloadNodejs '+toolPath);
|
||||
|
||||
return toolPath;
|
||||
} catch (error) {
|
||||
if (error instanceof tc.HTTPError && error.httpStatusCode === 404) {
|
||||
|
||||
Reference in New Issue
Block a user