error for wrong URL
parent
35af15253e
commit
5809c5dc63
|
@ -100238,6 +100238,9 @@ class BaseDistribution {
|
||||||
exeUrl = `${initialUrl}/v${version}/win-${osArch}/node.exe`;
|
exeUrl = `${initialUrl}/v${version}/win-${osArch}/node.exe`;
|
||||||
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;
|
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;
|
||||||
core.info(`Downloading only node binary from ${exeUrl}`);
|
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);
|
const exePath = yield tc.downloadTool(exeUrl);
|
||||||
yield io.cp(exePath, path.join(tempDir, 'node.exe'));
|
yield io.cp(exePath, path.join(tempDir, 'node.exe'));
|
||||||
const libPath = yield tc.downloadTool(libUrl);
|
const libPath = yield tc.downloadTool(libUrl);
|
||||||
|
|
|
@ -211,6 +211,8 @@ export default abstract class BaseDistribution {
|
||||||
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;
|
libUrl = `${initialUrl}/v${version}/win-${osArch}/node.lib`;
|
||||||
|
|
||||||
core.info(`Downloading only node binary from ${exeUrl}`);
|
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);
|
const exePath = await tc.downloadTool(exeUrl);
|
||||||
await io.cp(exePath, path.join(tempDir, 'node.exe'));
|
await io.cp(exePath, path.join(tempDir, 'node.exe'));
|
||||||
|
|
Loading…
Reference in New Issue