mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 13:14:44 +00:00
Added option to enable corepack (#1)
Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Sayak Mukhopadhyay <mukhopadhyaysayak@gmail.com> Co-authored-by: Jacob Parish <jacob.parish.1@gmail.com>
This commit is contained in:
parent
5ef044f9d0
commit
2936fe8cda
8 changed files with 132 additions and 15 deletions
|
@ -8,7 +8,11 @@ import * as path from 'path';
|
|||
import {restoreCache} from './cache-restore';
|
||||
import {isCacheFeatureAvailable} from './cache-utils';
|
||||
import {getNodejsDistribution} from './distributions/installer-factory';
|
||||
import {parseNodeVersionFile, printEnvDetailsAndSetOutput} from './util';
|
||||
import {
|
||||
parseNodeVersionFile,
|
||||
printEnvDetailsAndSetOutput,
|
||||
enableCorepack
|
||||
} from './util';
|
||||
import {State} from './constants';
|
||||
|
||||
export async function run() {
|
||||
|
@ -60,6 +64,9 @@ export async function run() {
|
|||
auth.configAuthentication(registryUrl, alwaysAuth);
|
||||
}
|
||||
|
||||
const corepack = core.getInput('corepack') || 'false';
|
||||
await enableCorepack(corepack);
|
||||
|
||||
if (cache && isCacheFeatureAvailable()) {
|
||||
core.saveState(State.CachePackageManager, cache);
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue