fix: pr review adjustments

This commit is contained in:
Jacob Parish 2024-02-06 09:27:54 -06:00
parent c871b9da45
commit c73bf9098a
4 changed files with 21 additions and 39 deletions

View file

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