mirror of
https://github.com/actions/setup-node.git
synced 2026-02-27 01:34:43 +08:00
feat: allow specifying a version
This commit is contained in:
@@ -110,6 +110,7 @@ export const unique = () => {
|
||||
|
||||
export async function enableCorepack(input: string): Promise<void> {
|
||||
if (input.length && input !== 'false') {
|
||||
await getCommandOutput('npm i -g corepack');
|
||||
const version = input === 'true' ? 'latest' : input;
|
||||
await getCommandOutput(`npm i -g corepack@${version}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user