Update index.js

This commit is contained in:
CNOCTAVE 2025-01-06 13:00:39 +08:00
parent 3ea0cefd51
commit 58a4f3c224

20
dist/setup/index.js vendored
View File

@ -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');