mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 21:04:45 +00:00
feat: allow specifying a version
This commit is contained in:
parent
4478bd4702
commit
aa9724272b
6 changed files with 40 additions and 6 deletions
3
dist/cache-save/index.js
vendored
3
dist/cache-save/index.js
vendored
|
@ -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
3
dist/setup/index.js
vendored
|
@ -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}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue