diff --git a/dist/save-cache/index.js b/dist/save-cache/index.js index 22a95c5..5f1f30a 100644 Binary files a/dist/save-cache/index.js and b/dist/save-cache/index.js differ diff --git a/dist/setup/index.js b/dist/setup/index.js index 2661774..51b882c 100644 Binary files a/dist/setup/index.js and b/dist/setup/index.js differ diff --git a/src/cache/restore-cache.ts b/src/cache/restore-cache.ts index c922d54..51aeefc 100644 --- a/src/cache/restore-cache.ts +++ b/src/cache/restore-cache.ts @@ -8,7 +8,6 @@ import {getArch, getPlatform} from '../utils/platforms' export const STATE_CACHE_KEY = 'cache-key' export const STATE_CACHE_MATCHED_KEY = 'cache-matched-key' const CACHE_VERSION = '1' -const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path.sep}${cacheDependencyGlob}` export async function restoreCache(version: string): Promise { const cacheKey = await computeKeys(version) @@ -33,7 +32,8 @@ export async function restoreCache(version: string): Promise { async function computeKeys(version: string): Promise { let cacheDependencyPathHash = '-' - if (fullCacheDependencyGlob !== '') { + if (cacheDependencyGlob !== '') { + const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path.sep}${cacheDependencyGlob}` cacheDependencyPathHash += await glob.hashFiles(fullCacheDependencyGlob) if (cacheDependencyPathHash === '-') { throw new Error(