mirror of
https://github.com/actions/setup-node.git
synced 2025-01-23 00:39:45 +08:00
Update index.js
This commit is contained in:
parent
3ea0cefd51
commit
58a4f3c224
20
dist/setup/index.js
vendored
20
dist/setup/index.js
vendored
|
@ -93687,10 +93687,30 @@ const semver_1 = __importDefault(__nccwpck_require__(1383));
|
||||||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||||
const base_distribution_1 = __importDefault(__nccwpck_require__(7));
|
const base_distribution_1 = __importDefault(__nccwpck_require__(7));
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
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 {
|
class BasePrereleaseNodejs extends base_distribution_1.default {
|
||||||
constructor(nodeInfo) {
|
constructor(nodeInfo) {
|
||||||
super(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() {
|
findVersionInHostedToolCacheDirectory() {
|
||||||
let toolPath = '';
|
let toolPath = '';
|
||||||
let nodeInstallationPath = core.getInput('node-installation-path');
|
let nodeInstallationPath = core.getInput('node-installation-path');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user