From df0cc1dcf0f7ed6b730ed3a442e5bf22a6d8fc89 Mon Sep 17 00:00:00 2001 From: James Braza Date: Thu, 2 Oct 2025 08:16:45 -0700 Subject: [PATCH] Ran 'npm run all' --- dist/save-cache/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dist/save-cache/index.js b/dist/save-cache/index.js index 552ac75..767e9a1 100644 --- a/dist/save-cache/index.js +++ b/dist/save-cache/index.js @@ -90056,12 +90056,17 @@ async function saveCache() { if (inputs_1.pruneCache) { await pruneCache(); } - core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`); - if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) { - throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`); + let actualCachePath = inputs_1.cacheLocalPath; + if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== inputs_1.cacheLocalPath) { + core.warning(`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${inputs_1.cacheLocalPath}".`); + actualCachePath = process.env.UV_CACHE_DIR; + } + core.info(`Saving cache path: ${actualCachePath}`); + if (!fs.existsSync(actualCachePath) && !inputs_1.ignoreNothingToCache) { + throw new Error(`Cache path ${actualCachePath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`); } try { - await cache.saveCache([inputs_1.cacheLocalPath], cacheKey); + await cache.saveCache([actualCachePath], cacheKey); core.info(`cache saved with the key: ${cacheKey}`); } catch (e) {