Change code according to review points

This commit is contained in:
Ivan Zosimov (Akvelon INC) 2022-02-28 15:30:28 +03:00
parent 86d1cd689b
commit 8d80cd6b60
5 changed files with 18 additions and 16 deletions

View file

@ -19,9 +19,8 @@ export async function run() {
// since getting unstable versions should be explicit
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
const cacheInput = core.getInput('cache');
const cache = cacheInput.toUpperCase() === 'TRUE' ? 'default' : cacheInput;
const cache = core.getInput('cache');
core.info(`Setup go ${stable ? 'stable' : ''} version spec ${versionSpec}`);
if (versionSpec) {
@ -49,7 +48,7 @@ export async function run() {
if (isGhes()) {
throw new Error('Caching is not supported on GHES');
}
const packageManager = core.getInput('package-manager');
const packageManager = cache.toUpperCase() === 'TRUE' ? 'default' : cache;
const cacheDependencyPath = core.getInput('cache-dependency-path');
await restoreCache(packageManager, cacheDependencyPath);
}