Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mirror-url parameter to allow downloading Node.js from a custom URL #1211

Closed
wants to merge 26 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
error
  • Loading branch information
aparnajyothi-y committed Jan 30, 2025
commit cc7fac46796d56fa446ea6e19e2471b1121d913b
6 changes: 5 additions & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -100686,10 +100686,14 @@ class OfficialBuilds extends base_distribution_1.default {
}
catch (error) {
if (error instanceof tc.HTTPError && error.httpStatusCode === 404) {
core.warning(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` +
core.error(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` +
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' +
'To resolve this issue you may either fall back to the older version or try again later.');
}
else {
// For any other error type, you can log the error message.
core.error(`An unexpected error occurred like url might not correct`);
}
throw error;
}
});
9 changes: 6 additions & 3 deletions src/distributions/official_builds/official_builds.ts
Original file line number Diff line number Diff line change
@@ -342,11 +342,14 @@ export default class OfficialBuilds extends BaseDistribution {
return toolPath;
} catch (error) {
if (error instanceof tc.HTTPError && error.httpStatusCode === 404) {
core.warning(
core.error(
`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` +
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' +
'To resolve this issue you may either fall back to the older version or try again later.'
'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' +
'To resolve this issue you may either fall back to the older version or try again later.'
);
} else {
// For any other error type, you can log the error message.
core.error(`An unexpected error occurred like url might not correct`);
}

throw error;