mirror of
https://github.com/actions/setup-node.git
synced 2025-01-31 12:27:12 +07:00
error for wrong URL
This commit is contained in:
parent
35af15253e
commit
5809c5dc63
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
@ -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
Block a user