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-update
  • Loading branch information
aparnajyothi-y committed Feb 3, 2025
commit e10de1c4d7367a3a2aa86d992e11904e5b05e3e9
5 changes: 5 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -100215,6 +100215,11 @@ class BaseDistribution {
this.osPlat == 'win32') {
return yield this.acquireWindowsNodeFromFallbackLocation(info.resolvedVersion, info.arch, info.downloadUrl);
}
// Handle network-related issues (e.g., DNS resolution failures)
if (err instanceof Error && err.message.includes('getaddrinfo EAI_AGAIN')) {
core.error(`Network error: Failed to resolve the server at ${info.downloadUrl}.
This could be due to a DNS resolution issue. Please verify the URL or check your network connection.`);
}
core.error(`Download failed from ${info.downloadUrl}. Please check the URl and try again.`);
throw err;
}
7 changes: 7 additions & 0 deletions src/distributions/base-distribution.ts
Original file line number Diff line number Diff line change
@@ -183,6 +183,13 @@ export default abstract class BaseDistribution {
info.downloadUrl
);
}
// Handle network-related issues (e.g., DNS resolution failures)
if (err instanceof Error && err.message.includes('getaddrinfo EAI_AGAIN')) {
core.error(
`Network error: Failed to resolve the server at ${info.downloadUrl}.
This could be due to a DNS resolution issue. Please verify the URL or check your network connection.`
);
}
core.error(
`Download failed from ${info.downloadUrl}. Please check the URl and try again.`
);
Loading
Oops, something went wrong.