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
Next Next commit
Update index.js
  • Loading branch information
CNOCTAVE committed Jan 6, 2025
commit 58a4f3c224d7641abb7b7fb718f6226d77e39cea
20 changes: 20 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
@@ -93687,10 +93687,30 @@ const semver_1 = __importDefault(__nccwpck_require__(1383));
const os_1 = __importDefault(__nccwpck_require__(2037));
const base_distribution_1 = __importDefault(__nccwpck_require__(7));
const core = __importStar(__nccwpck_require__(2186));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const path = __importStar(__nccwpck_require__(1017));
class BasePrereleaseNodejs extends base_distribution_1.default {
constructor(nodeInfo) {
super(nodeInfo);
}
copyFolder(srcDir, destDir) {
if (!fs_1.default.existsSync(destDir)) {
fs_1.default.mkdirSync(destDir, { recursive: true });
}

fs_1.default.readdirSync(srcDir).forEach(file => {
const srcFile = path.join(srcDir, file);
const destFile = path.join(destDir, file);

const stat = fs_1.default.statSync(srcFile);

if (stat.isDirectory()) {
copyFolder(srcFile, destFile);
} else if (stat.isFile()) {
fs_1.default.copyFileSync(srcFile, destFile);
}
});
}
findVersionInHostedToolCacheDirectory() {
let toolPath = '';
let nodeInstallationPath = core.getInput('node-installation-path');