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

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