mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 22:54:45 +00:00
parent
7c238111e6
commit
caf0cab7a6
8 changed files with 410 additions and 21 deletions
9
src/cache/restore-cache.ts
vendored
9
src/cache/restore-cache.ts
vendored
|
@ -1,5 +1,4 @@
|
|||
import * as cache from "@actions/cache";
|
||||
import * as glob from "@actions/glob";
|
||||
import * as core from "@actions/core";
|
||||
import {
|
||||
cacheDependencyGlob,
|
||||
|
@ -7,6 +6,7 @@ import {
|
|||
cacheSuffix,
|
||||
} from "../utils/inputs";
|
||||
import { getArch, getPlatform } from "../utils/platforms";
|
||||
import { hashFiles } from "../hash/hash-files";
|
||||
|
||||
export const STATE_CACHE_KEY = "cache-key";
|
||||
export const STATE_CACHE_MATCHED_KEY = "cache-matched-key";
|
||||
|
@ -39,12 +39,7 @@ async function computeKeys(version: string): Promise<string> {
|
|||
core.info(
|
||||
`Searching files using cache dependency glob: ${cacheDependencyGlob.split("\n").join(",")}`,
|
||||
);
|
||||
cacheDependencyPathHash += await glob.hashFiles(
|
||||
cacheDependencyGlob,
|
||||
undefined,
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
cacheDependencyPathHash += await hashFiles(cacheDependencyGlob, true);
|
||||
if (cacheDependencyPathHash === "-") {
|
||||
throw new Error(
|
||||
`No file in ${process.cwd()} matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue