From 691a0914850657ac9fc03cf795ac78e3a09340e4 Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Sat, 23 Nov 2024 12:03:08 +0100 Subject: [PATCH] Remove working dir from cacheDependencyGlob error message (#162) Since https://github.com/astral-sh/setup-uv/pull/160 we allow searching everywhere --- dist/save-cache/index.js | 2 +- dist/setup/index.js | 2 +- src/cache/restore-cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/save-cache/index.js b/dist/save-cache/index.js index 7f546d4..ea6058c 100644 --- a/dist/save-cache/index.js +++ b/dist/save-cache/index.js @@ -82336,7 +82336,7 @@ function computeKeys(version) { core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`); cacheDependencyPathHash += yield (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true); if (cacheDependencyPathHash === "-") { - throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`); + throw new Error(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`); } } else { diff --git a/dist/setup/index.js b/dist/setup/index.js index 516fc7f..a17d5c8 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -87419,7 +87419,7 @@ function computeKeys(version) { core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`); cacheDependencyPathHash += yield (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true); if (cacheDependencyPathHash === "-") { - throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`); + throw new Error(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`); } } else { diff --git a/src/cache/restore-cache.ts b/src/cache/restore-cache.ts index 0c07873..c4067d2 100644 --- a/src/cache/restore-cache.ts +++ b/src/cache/restore-cache.ts @@ -42,7 +42,7 @@ async function computeKeys(version: string): Promise { 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`, + `No file matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`, ); } } else {