Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add feature to copy toolPath to node-installation-path #1182

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update index.js
  • Loading branch information
CNOCTAVE committed Jan 6, 2025
commit f3176f950c29cdc1b367273a02fe981455013675
10 changes: 5 additions & 5 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -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,22 +94009,22 @@ 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);
}
}
// 7z extracts to folder matching file name
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);
}
}