error for wrong URL

This commit is contained in:
Aparna Jyothi 2025-01-30 17:09:26 +05:30
parent 35af15253e
commit 5809c5dc63
2 changed files with 5 additions and 0 deletions

3
dist/setup/index.js vendored
View File

@ -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);

View File

@ -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'));