update impl

This commit is contained in:
Adam 2022-10-07 20:47:06 +02:00
parent 42d6dff7e7
commit 9a425941d6
2 changed files with 796 additions and 783 deletions

16
dist/setup/index.js vendored
View file

@ -73586,13 +73586,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
const installer = __importStar(__nccwpck_require__(2574));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const auth = __importStar(__nccwpck_require__(7573));
const os_1 = __importDefault(__nccwpck_require__(2037));
const path = __importStar(__nccwpck_require__(1017));
const auth = __importStar(__nccwpck_require__(7573));
const cache_restore_1 = __nccwpck_require__(9517);
const cache_utils_1 = __nccwpck_require__(1678);
const os = __nccwpck_require__(2037);
const installer = __importStar(__nccwpck_require__(2574));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -73609,7 +73609,7 @@ function run() {
core.warning('`architecture` is provided but `node-version` is missing. In this configuration, the version/architecture of Node will not be changed. To fix this, provide `architecture` in combination with `node-version`');
}
if (!arch) {
arch = os.arch();
arch = os_1.default.arch();
}
if (version) {
let token = core.getInput('token');
@ -73624,6 +73624,14 @@ function run() {
if (registryUrl) {
auth.configAuthentication(registryUrl, alwaysAuth);
}
const enableCorepack = core.getInput('corepack');
if (enableCorepack !== 'false') {
const args = ['enable'];
if (enableCorepack !== 'true') {
args.push(...enableCorepack.split(' '));
}
yield exec.exec('corepack', args);
}
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
const cacheDependencyPath = core.getInput('cache-dependency-path');
yield cache_restore_1.restoreCache(cache, cacheDependencyPath);

View file

@ -48,9 +48,14 @@ export async function run() {
auth.configAuthentication(registryUrl, alwaysAuth);
}
const enableCorepack = core.getBooleanInput('corepack');
if (enableCorepack) {
await exec.exec('corepack', ['enable']);
const enableCorepack = core.getInput('corepack');
if (enableCorepack !== 'false') {
const args = ['enable'];
if (enableCorepack !== 'true') {
args.push(...enableCorepack.split(' '));
}
await exec.exec('corepack', args);
}
if (cache && isCacheFeatureAvailable()) {