mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-01-19 16:28:18 +08:00
Compute correct cacheDependencyPathHash
This commit is contained in:
parent
e4c1a1723b
commit
4203354a33
BIN
dist/save-cache/index.js
generated
vendored
BIN
dist/save-cache/index.js
generated
vendored
Binary file not shown.
BIN
dist/setup/index.js
generated
vendored
BIN
dist/setup/index.js
generated
vendored
Binary file not shown.
4
src/cache/restore-cache.ts
vendored
4
src/cache/restore-cache.ts
vendored
@ -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<void> {
|
||||
const cacheKey = await computeKeys(version)
|
||||
@ -33,7 +32,8 @@ export async function restoreCache(version: string): Promise<void> {
|
||||
|
||||
async function computeKeys(version: string): Promise<string> {
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user