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 for wrong URL
  • Loading branch information
aparnajyothi-y committed Jan 30, 2025
commit 5809c5dc63dd56167574d2d593e883852ba2f6ac
3 changes: 3 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -100238,6 +100238,9 @@ class BaseDistribution {
exeUrl = `${initialUrl}/v${version}/win-${osArch}/node.exe`;
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;
core.info(`Downloading only node binary from ${exeUrl}`);
if (!exeUrl) {
core.error('unable to download node binary with the provided URL. Please check and try again');
}
const exePath = yield tc.downloadTool(exeUrl);
yield io.cp(exePath, path.join(tempDir, 'node.exe'));
const libPath = yield tc.downloadTool(libUrl);
2 changes: 2 additions & 0 deletions src/distributions/base-distribution.ts
Original file line number Diff line number Diff line change
@@ -211,6 +211,8 @@ export default abstract class BaseDistribution {
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;

core.info(`Downloading only node binary from ${exeUrl}`);
if(!exeUrl ){core.error('unable to download node binary with the provided URL. Please check and try again');}


const exePath = await tc.downloadTool(exeUrl);
await io.cp(exePath, path.join(tempDir, 'node.exe'));