mirror of
https://github.com/actions/setup-node.git
synced 2025-07-23 15:08:24 +02:00
prints
This commit is contained in:
parent
91a5e5da06
commit
7188cb1e62
3 changed files with 26 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue