From 8d03e45fdded7a857cda68d07db0e119901d66f7 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 5 Aug 2019 21:51:56 -0400 Subject: [PATCH] Update installer.js --- lib/installer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/installer.js b/lib/installer.js index 5b8c592e..29de9a01 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -205,18 +205,18 @@ function acquireNodeFromFallbackLocation(version) { exeUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.exe`; libUrl = `https://nodejs.org/dist/v${version}/win-${os.arch()}/node.lib`; const exePath = yield tc.downloadTool(exeUrl); - yield io.cp(exePath, path.join(tempDir, 'node.exe'), {recursive: true}); + yield io.cp(exePath, path.join(tempDir, 'node.exe')); const libPath = yield tc.downloadTool(libUrl); - yield io.cp(libPath, path.join(tempDir, 'node.lib'), {recursive: true}); + yield io.cp(libPath, path.join(tempDir, 'node.lib')); } catch (err) { if (err instanceof tc.HTTPError && err.httpStatusCode == 404) { exeUrl = `https://nodejs.org/dist/v${version}/node.exe`; libUrl = `https://nodejs.org/dist/v${version}/node.lib`; const exePath = yield tc.downloadTool(exeUrl); - yield io.mv(exePath, path.join(tempDir, 'node.exe')); + yield io.cp(exePath, path.join(tempDir, 'node.exe')); const libPath = yield tc.downloadTool(libUrl); - yield io.mv(libPath, path.join(tempDir, 'node.lib')); + yield io.cp(libPath, path.join(tempDir, 'node.lib')); } else { throw err;