From f3176f950c29cdc1b367273a02fe981455013675 Mon Sep 17 00:00:00 2001 From: CNOCTAVE Date: Tue, 7 Jan 2025 01:15:12 +0800 Subject: [PATCH] Update index.js --- dist/setup/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 4b0c76ba..e5ed80c8 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -93730,7 +93730,7 @@ class BasePrereleaseNodejs extends base_distribution_1.default { const localVersion = this.evaluateVersions(localVersionPaths); if (localVersion) { toolPath = tc.find('node', localVersion, this.nodeInfo.arch); - if (nodeInstallationPath !== '') { + if ((nodeInstallationPath !== '') && (nodeInstallationPath !== toolPath)) { this.copyFolder(toolPath, nodeInstallationPath); } } @@ -94009,14 +94009,14 @@ class BaseDistribution { const renamedArchive = `${downloadPath}.zip`; fs_1.default.renameSync(downloadPath, renamedArchive); extPath = yield tc.extractZip(renamedArchive); - if (nodeInstallationPath !== '') { + if ((nodeInstallationPath !== '') && (nodeInstallationPath !== extPath)) { this.copyFolder(extPath, nodeInstallationPath); } } else { const _7zPath = path.join(__dirname, '../..', 'externals', '7zr.exe'); extPath = yield tc.extract7z(downloadPath, undefined, _7zPath); - if (nodeInstallationPath !== '') { + if ((nodeInstallationPath !== '') && (nodeInstallationPath !== extPath)) { this.copyFolder(extPath, nodeInstallationPath); } } @@ -94024,7 +94024,7 @@ class BaseDistribution { const nestedPath = path.join(extPath, path.basename(info.fileName, extension)); if (fs_1.default.existsSync(nestedPath)) { extPath = nestedPath; - if (nodeInstallationPath !== '') { + if ((nodeInstallationPath !== '') && (nodeInstallationPath !== extPath)) { this.copyFolder(extPath, nodeInstallationPath); } } @@ -94035,7 +94035,7 @@ class BaseDistribution { '--strip', '1' ]); - if (nodeInstallationPath !== '') { + if ((nodeInstallationPath !== '') && (nodeInstallationPath !== extPath)) { this.copyFolder(extPath, nodeInstallationPath); } }