feat: allow specifying a version

This commit is contained in:
Jacob Parish 2025-03-25 11:13:23 -05:00
parent 4478bd4702
commit aa9724272b
6 changed files with 40 additions and 6 deletions

View file

@ -88341,7 +88341,8 @@ exports.unique = unique;
function enableCorepack(input) {
return __awaiter(this, void 0, void 0, function* () {
if (input.length && input !== 'false') {
yield (0, cache_utils_1.getCommandOutput)('npm i -g corepack');
const version = input === 'true' ? 'latest' : input;
yield (0, cache_utils_1.getCommandOutput)(`npm i -g corepack@${version}`);
}
});
}

3
dist/setup/index.js vendored
View file

@ -98019,7 +98019,8 @@ exports.unique = unique;
function enableCorepack(input) {
return __awaiter(this, void 0, void 0, function* () {
if (input.length && input !== 'false') {
yield (0, cache_utils_1.getCommandOutput)('npm i -g corepack');
const version = input === 'true' ? 'latest' : input;
yield (0, cache_utils_1.getCommandOutput)(`npm i -g corepack@${version}`);
}
});
}