mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 21:04:45 +00:00
fix: pr review adjustments
This commit is contained in:
parent
c871b9da45
commit
c73bf9098a
4 changed files with 21 additions and 39 deletions
9
dist/cache-save/index.js
vendored
9
dist/cache-save/index.js
vendored
|
@ -83338,6 +83338,7 @@ const core = __importStar(__nccwpck_require__(2186));
|
|||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
const cache_utils_1 = __nccwpck_require__(1678);
|
||||
function getNodeVersionFromFile(versionFilePath) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
if (!fs_1.default.existsSync(versionFilePath)) {
|
||||
|
@ -83431,15 +83432,13 @@ const unique = () => {
|
|||
exports.unique = unique;
|
||||
function enableCorepack(input) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const corepackArgs = ['enable'];
|
||||
if (input.length > 0 && input !== 'false') {
|
||||
if (input.length && input !== 'false') {
|
||||
const corepackArgs = ['enable'];
|
||||
if (input !== 'true') {
|
||||
const packageManagers = input.split(' ');
|
||||
corepackArgs.push(...packageManagers);
|
||||
}
|
||||
yield exec.getExecOutput('corepack', corepackArgs, {
|
||||
ignoreReturnCode: true
|
||||
});
|
||||
yield (0, cache_utils_1.getCommandOutput)(`corepack ${corepackArgs.join(' ')}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue