start corepack test

This commit is contained in:
Ethan Arrowood 2022-05-02 14:58:57 -06:00
parent 70c3da958b
commit 1e2990d3cd
No known key found for this signature in database
GPG key ID: ED811E6BC98E8742
4 changed files with 362 additions and 250 deletions

View file

@ -47,8 +47,12 @@ export async function run() {
}
if (cache && isCacheFeatureAvailable()) {
if (semver.gte(version, '14')) {
await getCommandOutput('corepack enable');
if (semver.gte(version, '14.19.0')) {
try {
core.info(await getCommandOutput('corepack enable'));
} catch (err) {
core.warning(`Failed to enable corepack. Error: ${err.message}`)
}
}
const cacheDependencyPath = core.getInput('cache-dependency-path');
await restoreCache(cache, cacheDependencyPath);