From 07ecad3aa8ad98fa8f17e45ba641f3fa7d7eb897 Mon Sep 17 00:00:00 2001 From: "Ivan Zosimov (Akvelon INC)" Date: Sat, 5 Mar 2022 13:24:53 +0300 Subject: [PATCH] Add changes before sync with upstream --- dist/setup/index.js | 5 ++--- src/cache-save.ts | 5 +++-- src/main.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index a363e32..8d71339 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -3705,8 +3705,7 @@ function run() { // stable will be true unless false is the exact input // 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) { let token = core.getInput('token'); @@ -3724,7 +3723,7 @@ 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'); yield cache_restore_1.restoreCache(packageManager, cacheDependencyPath); } diff --git a/src/cache-save.ts b/src/cache-save.ts index 94ac434..4f2afae 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -26,8 +26,9 @@ const cachePackages = async () => { return; } - const packageManager = cacheInput.toUpperCase() === 'TRUE' ? 'default' : cacheInput; - + const packageManager = + cacheInput.toUpperCase() === 'TRUE' ? 'default' : cacheInput; + const state = core.getState(State.CacheMatchedKey); const primaryKey = core.getState(State.CachePrimaryKey); diff --git a/src/main.ts b/src/main.ts index 8a6548f..fdf4ce4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,7 +20,7 @@ export async function run() { let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE'; const cache = core.getInput('cache'); - + core.info(`Setup go ${stable ? 'stable' : ''} version spec ${versionSpec}`); if (versionSpec) {