diff --git a/dist/save-cache/index.js b/dist/save-cache/index.js index aba2bdd..40fc834 100644 --- a/dist/save-cache/index.js +++ b/dist/save-cache/index.js @@ -91490,10 +91490,8 @@ 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 matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`); + core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`); } - } - else { cacheDependencyPathHash += "no-dependency-glob"; } const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : ""; diff --git a/dist/setup/index.js b/dist/setup/index.js index 9d8c0e9..37f27f9 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96573,10 +96573,8 @@ 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 matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`); + core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`); } - } - else { cacheDependencyPathHash += "no-dependency-glob"; } const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : ""; diff --git a/src/cache/restore-cache.ts b/src/cache/restore-cache.ts index 90631b9..e2d39ae 100644 --- a/src/cache/restore-cache.ts +++ b/src/cache/restore-cache.ts @@ -43,11 +43,10 @@ async function computeKeys(version: string): Promise { ); cacheDependencyPathHash += await hashFiles(cacheDependencyGlob, true); if (cacheDependencyPathHash === "-") { - throw new Error( - `No file matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`, + core.warning( + `No file matched to [${cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`, ); } - } else { cacheDependencyPathHash += "no-dependency-glob"; } const suffix = cacheSuffix ? `-${cacheSuffix}` : "";